Struct dinglebit_terminal::style::Style
source · [−]pub struct Style { /* private fields */ }
Expand description
A Stylized text that can be output to a terminal.
Examples
let s = Style::new(format!("{}, {}!", "Hello", "world"))
.black()
.underline()
.to_string();
assert_eq!(s, "\x1b[30;4mHello, world!\x1b[0m");
Implementations
sourceimpl Style
impl Style
sourcepub fn slow_blink(&mut self) -> &mut Self
pub fn slow_blink(&mut self) -> &mut Self
Apply a slow blink value to the escape sequence.
sourcepub fn fast_blink(&mut self) -> &mut Self
pub fn fast_blink(&mut self) -> &mut Self
Apply a fast blink value to the escape sequence.
sourcepub fn strikethrough(&mut self) -> &mut Self
pub fn strikethrough(&mut self) -> &mut Self
Apply a strikethrough value to the escape sequence.
sourcepub fn black(&mut self) -> &mut Self
pub fn black(&mut self) -> &mut Self
Apply the foreground color black value to the escape sequence.
sourcepub fn red(&mut self) -> &mut Self
pub fn red(&mut self) -> &mut Self
Apply the foreground color red value to the escape sequence.
sourcepub fn green(&mut self) -> &mut Self
pub fn green(&mut self) -> &mut Self
Apply the foreground color green value to the escape sequence.
sourcepub fn yellow(&mut self) -> &mut Self
pub fn yellow(&mut self) -> &mut Self
Apply the foreground color yellow value to the escape sequence.
sourcepub fn blue(&mut self) -> &mut Self
pub fn blue(&mut self) -> &mut Self
Apply the foreground color blue value to the escape sequence.
sourcepub fn magenta(&mut self) -> &mut Self
pub fn magenta(&mut self) -> &mut Self
Apply the foreground color magenta value to the escape sequence.
sourcepub fn cyan(&mut self) -> &mut Self
pub fn cyan(&mut self) -> &mut Self
Apply the foreground color cyan value to the escape sequence.
sourcepub fn white(&mut self) -> &mut Self
pub fn white(&mut self) -> &mut Self
Apply the foreground color white value to the escape sequence.
sourcepub fn gray(&mut self) -> &mut Self
pub fn gray(&mut self) -> &mut Self
Apply the foreground color gray value to the escape sequence.
sourcepub fn bright_red(&mut self) -> &mut Self
pub fn bright_red(&mut self) -> &mut Self
Apply the foreground color bright red value to the escape sequence.
sourcepub fn bright_green(&mut self) -> &mut Self
pub fn bright_green(&mut self) -> &mut Self
Apply the foreground color bright green value to the escape sequence.
sourcepub fn bright_yellow(&mut self) -> &mut Self
pub fn bright_yellow(&mut self) -> &mut Self
Apply the foreground color bright yellow value to the escape sequence.
sourcepub fn bright_blue(&mut self) -> &mut Self
pub fn bright_blue(&mut self) -> &mut Self
Apply the foreground color bright blue value to the escape sequence.
sourcepub fn bright_magenta(&mut self) -> &mut Self
pub fn bright_magenta(&mut self) -> &mut Self
Apply the foreground color bright magenta value to the escape sequence.
sourcepub fn bright_cyan(&mut self) -> &mut Self
pub fn bright_cyan(&mut self) -> &mut Self
Apply the foreground color bright cyan value to the escape sequence.
sourcepub fn bright_white(&mut self) -> &mut Self
pub fn bright_white(&mut self) -> &mut Self
Apply the foreground color bright white value to the escape sequence.
sourcepub fn bg_black(&mut self) -> &mut Self
pub fn bg_black(&mut self) -> &mut Self
Apply the background color black value to the escape sequence.
sourcepub fn bg_red(&mut self) -> &mut Self
pub fn bg_red(&mut self) -> &mut Self
Apply the background color red value to the escape sequence.
sourcepub fn bg_green(&mut self) -> &mut Self
pub fn bg_green(&mut self) -> &mut Self
Apply the background color green value to the escape sequence.
sourcepub fn bg_yellow(&mut self) -> &mut Self
pub fn bg_yellow(&mut self) -> &mut Self
Apply the background color yellow value to the escape sequence.
sourcepub fn bg_blue(&mut self) -> &mut Self
pub fn bg_blue(&mut self) -> &mut Self
Apply the background color blue value to the escape sequence.
sourcepub fn bg_magenta(&mut self) -> &mut Self
pub fn bg_magenta(&mut self) -> &mut Self
Apply the background color magenta value to the escape sequence.
sourcepub fn bg_cyan(&mut self) -> &mut Self
pub fn bg_cyan(&mut self) -> &mut Self
Apply the background color cyan value to the escape sequence.
sourcepub fn bg_white(&mut self) -> &mut Self
pub fn bg_white(&mut self) -> &mut Self
Apply the background color white value to the escape sequence.
sourcepub fn bg_gray(&mut self) -> &mut Self
pub fn bg_gray(&mut self) -> &mut Self
Apply the background color gray value to the escape sequence.
sourcepub fn bg_bright_red(&mut self) -> &mut Self
pub fn bg_bright_red(&mut self) -> &mut Self
Apply the background color bright red value to the escape sequence.
sourcepub fn bg_bright_green(&mut self) -> &mut Self
pub fn bg_bright_green(&mut self) -> &mut Self
Apply the background color bright green value to the escape sequence.
sourcepub fn bg_bright_yellow(&mut self) -> &mut Self
pub fn bg_bright_yellow(&mut self) -> &mut Self
Apply the background color bright yellow value to the escape sequence.
sourcepub fn bg_bright_blue(&mut self) -> &mut Self
pub fn bg_bright_blue(&mut self) -> &mut Self
Apply the background color bright blue value to the escape sequence.
sourcepub fn bg_bright_magenta(&mut self) -> &mut Self
pub fn bg_bright_magenta(&mut self) -> &mut Self
Apply the background color bright magenta value to the escape sequence.
sourcepub fn bg_bright_cyan(&mut self) -> &mut Self
pub fn bg_bright_cyan(&mut self) -> &mut Self
Apply the background color bright cyan value to the escape sequence.
sourcepub fn bg_bright_white(&mut self) -> &mut Self
pub fn bg_bright_white(&mut self) -> &mut Self
Apply the background color bright white value to the escape sequence.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnwindSafe for Style
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more