]>
git.proxmox.com Git - rustc.git/blob - vendor/colored/examples/dynamic_colors.rs
6 "blue string yo".color("blue");
8 // this will default to white
9 "white string".color("zorglub");
11 // the safer way via a Result
12 let color_res
= "zorglub".parse(); // <- this returns a Result<Color, ()>
13 "red string".color(color_res
.unwrap_or(Color
::Red
));