pub enum ColorMode {
On,
Off,
}Expand description
Color mode to switch terminal colouring ON or OFF.
Variants§
Implementations§
source§impl ColorMode
impl ColorMode
pub fn new(s: &str) -> Self
pub fn black(&self) -> String
pub fn red(&self) -> String
pub fn green(&self) -> String
pub fn yellow(&self) -> String
pub fn blue(&self) -> String
pub fn magenta(&self) -> String
pub fn cyan(&self) -> String
pub fn white(&self) -> String
pub fn bg_black(&self) -> String
pub fn bg_red(&self) -> String
pub fn bg_green(&self) -> String
pub fn bg_yellow(&self) -> String
pub fn bg_blue(&self) -> String
pub fn bg_magenta(&self) -> String
pub fn bg_cyan(&self) -> String
pub fn bg_white(&self) -> String
pub fn color(&self, c: Color) -> String
pub fn bg_color(&self, c: Color) -> String
pub fn color_8(&self, c: u8) -> String
pub fn bg_color_8(&self, c: u8) -> String
pub fn color_256(&self, c: u8) -> String
pub fn bg_color_256(&self, c: u8) -> String
pub fn color_rgb(&self, c: RgbColor) -> String
pub fn bg_color_rgb(&self, c: RgbColor) -> String
pub fn bold(&self) -> &str
pub fn italic(&self) -> &str
pub fn underline(&self) -> &str
pub fn clear(&self) -> &str
Trait Implementations§
impl Copy for ColorMode
impl Eq for ColorMode
impl StructuralPartialEq for ColorMode
Auto Trait Implementations§
impl Freeze for ColorMode
impl RefUnwindSafe for ColorMode
impl Send for ColorMode
impl Sync for ColorMode
impl Unpin for ColorMode
impl UnwindSafe for ColorMode
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)