pub struct Palette { /* private fields */ }Expand description
A colour policy: either emits ANSI SGR codes or is the identity.
Implementations§
Source§impl Palette
impl Palette
pub fn new(enabled: bool) -> Self
pub fn bold(self, s: &str) -> String
pub fn dim(self, s: &str) -> String
pub fn red(self, s: &str) -> String
pub fn green(self, s: &str) -> String
pub fn yellow(self, s: &str) -> String
pub fn blue(self, s: &str) -> String
pub fn magenta(self, s: &str) -> String
pub fn cyan(self, s: &str) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Palette
impl RefUnwindSafe for Palette
impl Send for Palette
impl Sync for Palette
impl Unpin for Palette
impl UnsafeUnpin for Palette
impl UnwindSafe for Palette
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