pub struct Style { /* private fields */ }Expand description
ANSI styling, globally disabled when output is not a terminal or when
NO_COLOR is set.
Implementations§
Source§impl Style
impl Style
pub fn new(enabled: bool) -> Self
pub fn is_enabled(&self) -> bool
pub fn bold(&self, t: &str) -> String
pub fn dim(&self, t: &str) -> String
pub fn green(&self, t: &str) -> String
pub fn red(&self, t: &str) -> String
pub fn yellow(&self, t: &str) -> String
pub fn cyan(&self, t: &str) -> String
pub fn blue(&self, t: &str) -> String
pub fn magenta(&self, t: &str) -> String
pub fn bright_green(&self, t: &str) -> String
pub fn bright_cyan(&self, t: &str) -> String
pub fn bold_green(&self, t: &str) -> String
pub fn bold_red(&self, t: &str) -> String
pub fn bold_cyan(&self, t: &str) -> String
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnsafeUnpin for Style
impl UnwindSafe for Style
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