pub enum Color {
Black,
Red,
Green,
Yellow,
Blue,
Magenta,
Cyan,
White,
Custom(u8),
}Expand description
Standard ANSI colors for hint text.
Variants§
Black
Standard Black (ANSI 30)
Red
Standard Red (ANSI 31)
Green
Standard Green (ANSI 32)
Yellow
Standard Yellow (ANSI 33)
Blue
Standard Blue (ANSI 34)
Magenta
Standard Magenta (ANSI 35)
Cyan
Standard Cyan (ANSI 36)
White
Standard White (ANSI 37)
Custom(u8)
Custom ANSI color code
Implementations§
Source§impl Color
impl Color
Sourcepub fn to_ansi_code(&self) -> u8
pub fn to_ansi_code(&self) -> u8
Converts this color to its ANSI numeric code.
Sourcepub fn from_ansi_code(code: u8) -> Self
pub fn from_ansi_code(code: u8) -> Self
Creates a Color from an ANSI numeric code.
Trait Implementations§
impl Copy for Color
impl Eq for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnsafeUnpin for Color
impl UnwindSafe for Color
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more