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§
Source§impl 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.