pub trait Stylize: Display {
Show 56 methods
// Provided methods
fn bold(&self) -> String { ... }
fn faint(&self) -> String { ... }
fn italics(&self) -> String { ... }
fn underlined(&self) -> String { ... }
fn double_underlined(&self) -> String { ... }
fn slow_blink(&self) -> String { ... }
fn fast_blink(&self) -> String { ... }
fn inverted(&self) -> String { ... }
fn invisible(&self) -> String { ... }
fn striked(&self) -> String { ... }
fn overlined(&self) -> String { ... }
fn black(&self) -> String { ... }
fn red(&self) -> String { ... }
fn green(&self) -> String { ... }
fn yellow(&self) -> String { ... }
fn blue(&self) -> String { ... }
fn magenta(&self) -> String { ... }
fn cyan(&self) -> String { ... }
fn white(&self) -> String { ... }
fn bright_black(&self) -> String { ... }
fn bright_red(&self) -> String { ... }
fn bright_green(&self) -> String { ... }
fn bright_yellow(&self) -> String { ... }
fn bright_blue(&self) -> String { ... }
fn bright_magenta(&self) -> String { ... }
fn bright_cyan(&self) -> String { ... }
fn bright_white(&self) -> String { ... }
fn black_bg(&self) -> String { ... }
fn red_bg(&self) -> String { ... }
fn green_bg(&self) -> String { ... }
fn yellow_bg(&self) -> String { ... }
fn blue_bg(&self) -> String { ... }
fn magenta_bg(&self) -> String { ... }
fn cyan_bg(&self) -> String { ... }
fn white_bg(&self) -> String { ... }
fn bright_black_bg(&self) -> String { ... }
fn bright_red_bg(&self) -> String { ... }
fn bright_green_bg(&self) -> String { ... }
fn bright_yellow_bg(&self) -> String { ... }
fn bright_blue_bg(&self) -> String { ... }
fn bright_magenta_bg(&self) -> String { ... }
fn bright_cyan_bg(&self) -> String { ... }
fn bright_white_bg(&self) -> String { ... }
fn orange(&self) -> String { ... }
fn orange_bg(&self) -> String { ... }
fn blueberry(&self) -> String { ... }
fn blueberry_bg(&self) -> String { ... }
fn pink(&self) -> String { ... }
fn pink_bg(&self) -> String { ... }
fn rgb(&self, Rgb: Rgb) -> String { ... }
fn rgb_bg(&self, Rgb: Rgb) -> String { ... }
fn style(&self) -> StyleBuilder { ... }
fn deprecated(&self) -> String { ... }
fn error(&self) -> String { ... }
fn warning(&self) -> String { ... }
fn success(&self) -> String { ... }
}Expand description
A trait that provides styling for terminals that support ANSI escape codes.
Provided Methods§
Sourcefn bold(&self) -> String
fn bold(&self) -> String
Makes the text bold. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn faint(&self) -> String
fn faint(&self) -> String
Displays the text based on the corresponding style predefined by the terminal.
Sourcefn italics(&self) -> String
fn italics(&self) -> String
Makes the text cursive. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn underlined(&self) -> String
fn underlined(&self) -> String
Adds a line under the text. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn double_underlined(&self) -> String
fn double_underlined(&self) -> String
Displays the text based on the corresponding style predefined by the terminal.
Sourcefn slow_blink(&self) -> String
fn slow_blink(&self) -> String
Displays the text based on the corresponding style predefined by the terminal.
Sourcefn fast_blink(&self) -> String
fn fast_blink(&self) -> String
Displays the text based on the corresponding style predefined by the terminal.
Sourcefn inverted(&self) -> String
fn inverted(&self) -> String
Displays the text based on the corresponding style predefined by the terminal.
Sourcefn invisible(&self) -> String
fn invisible(&self) -> String
Make the text invisible Displays the text based on the corresponding style predefined by the terminal.
Sourcefn striked(&self) -> String
fn striked(&self) -> String
Adds a line through the text. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn overlined(&self) -> String
fn overlined(&self) -> String
Displays the text based on the corresponding style predefined by the terminal.
Sourcefn black(&self) -> String
fn black(&self) -> String
Makes the text black. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn red(&self) -> String
fn red(&self) -> String
Makes the text red. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn green(&self) -> String
fn green(&self) -> String
Makes the text green. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn yellow(&self) -> String
fn yellow(&self) -> String
Makes the text yellow. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn blue(&self) -> String
fn blue(&self) -> String
Makes the text blue. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn magenta(&self) -> String
fn magenta(&self) -> String
Makes the text magenta. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn cyan(&self) -> String
fn cyan(&self) -> String
Makes the text cyan. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn white(&self) -> String
fn white(&self) -> String
Makes the text white. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn bright_black(&self) -> String
fn bright_black(&self) -> String
Makes the text bright black. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn bright_red(&self) -> String
fn bright_red(&self) -> String
Makes the text bright red. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn bright_green(&self) -> String
fn bright_green(&self) -> String
Makes the text bright green. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn bright_yellow(&self) -> String
fn bright_yellow(&self) -> String
Makes the text bright yellow. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn bright_blue(&self) -> String
fn bright_blue(&self) -> String
Makes the text bright blue. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn bright_magenta(&self) -> String
fn bright_magenta(&self) -> String
Makes the text bright magenta. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn bright_cyan(&self) -> String
fn bright_cyan(&self) -> String
Makes the text bright cyan. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn bright_white(&self) -> String
fn bright_white(&self) -> String
Makes the text bright white. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn black_bg(&self) -> String
fn black_bg(&self) -> String
Makes the background black. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn red_bg(&self) -> String
fn red_bg(&self) -> String
Makes the background red. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn green_bg(&self) -> String
fn green_bg(&self) -> String
Makes the background green. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn yellow_bg(&self) -> String
fn yellow_bg(&self) -> String
Makes the background yellow. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn blue_bg(&self) -> String
fn blue_bg(&self) -> String
Makes the background blue. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn magenta_bg(&self) -> String
fn magenta_bg(&self) -> String
Makes the background magenta. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn cyan_bg(&self) -> String
fn cyan_bg(&self) -> String
Makes the background cyan. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn white_bg(&self) -> String
fn white_bg(&self) -> String
Makes the background white. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn bright_black_bg(&self) -> String
fn bright_black_bg(&self) -> String
Makes the background bright black. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn bright_red_bg(&self) -> String
fn bright_red_bg(&self) -> String
Makes the background bright red. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn bright_green_bg(&self) -> String
fn bright_green_bg(&self) -> String
Makes the background bright green. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn bright_yellow_bg(&self) -> String
fn bright_yellow_bg(&self) -> String
Makes the background bright yellow. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn bright_blue_bg(&self) -> String
fn bright_blue_bg(&self) -> String
Makes the background bright blue. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn bright_magenta_bg(&self) -> String
fn bright_magenta_bg(&self) -> String
Makes the background bright magenta. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn bright_cyan_bg(&self) -> String
fn bright_cyan_bg(&self) -> String
Makes the background bright cyan. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn bright_white_bg(&self) -> String
fn bright_white_bg(&self) -> String
Makes the background bright white. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn orange(&self) -> String
fn orange(&self) -> String
Makes the text orange. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn orange_bg(&self) -> String
fn orange_bg(&self) -> String
Makes the background orange. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn blueberry(&self) -> String
fn blueberry(&self) -> String
Makes the text blueberry. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn blueberry_bg(&self) -> String
fn blueberry_bg(&self) -> String
Makes the background blueberry. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn pink(&self) -> String
fn pink(&self) -> String
Makes the text pink. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn pink_bg(&self) -> String
fn pink_bg(&self) -> String
Makes the background pink. Displays the text based on the corresponding style predefined by the terminal.
Sourcefn style(&self) -> StyleBuilder
fn style(&self) -> StyleBuilder
Creates a StyleBuilder, use it to combine multiple styles. Don’t forget to call build!
Sourcefn deprecated(&self) -> String
fn deprecated(&self) -> String
Applies the italics and strikethrough styles.