pub struct Style { /* private fields */ }Expand description
Stylize text with ANSI codes
Color uses Color enum
Decorations include bold, dim, italic, and underline
Create with Style::new()
§Examples
let style = Style::new().color(Red).italic();
println!("{}", style.format("Hello!"));Implementations§
Trait Implementations§
impl Copy for Style
impl StructuralPartialEq for Style
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin 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