1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
pub enum Color { Black, Red, Green, Yellow, Blue, Magenta, Cyan, White, Default, Reset, } pub trait Colorable { fn set_bg_color(&mut self, color: Option<Color>); fn set_fg_color(&mut self, color: Option<Color>); }