Stylize

Trait Stylize 

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

Source

fn bold(&self) -> String

Makes the text bold. Displays the text based on the corresponding style predefined by the terminal.

Source

fn faint(&self) -> String

Displays the text based on the corresponding style predefined by the terminal.

Source

fn italics(&self) -> String

Makes the text cursive. Displays the text based on the corresponding style predefined by the terminal.

Source

fn underlined(&self) -> String

Adds a line under the text. Displays the text based on the corresponding style predefined by the terminal.

Source

fn double_underlined(&self) -> String

Displays the text based on the corresponding style predefined by the terminal.

Displays the text based on the corresponding style predefined by the terminal.

Displays the text based on the corresponding style predefined by the terminal.

Source

fn inverted(&self) -> String

Displays the text based on the corresponding style predefined by the terminal.

Source

fn invisible(&self) -> String

Make the text invisible Displays the text based on the corresponding style predefined by the terminal.

Source

fn striked(&self) -> String

Adds a line through the text. Displays the text based on the corresponding style predefined by the terminal.

Source

fn overlined(&self) -> String

Displays the text based on the corresponding style predefined by the terminal.

Source

fn black(&self) -> String

Makes the text black. Displays the text based on the corresponding style predefined by the terminal.

Source

fn red(&self) -> String

Makes the text red. Displays the text based on the corresponding style predefined by the terminal.

Source

fn green(&self) -> String

Makes the text green. Displays the text based on the corresponding style predefined by the terminal.

Source

fn yellow(&self) -> String

Makes the text yellow. Displays the text based on the corresponding style predefined by the terminal.

Source

fn blue(&self) -> String

Makes the text blue. Displays the text based on the corresponding style predefined by the terminal.

Source

fn magenta(&self) -> String

Makes the text magenta. Displays the text based on the corresponding style predefined by the terminal.

Source

fn cyan(&self) -> String

Makes the text cyan. Displays the text based on the corresponding style predefined by the terminal.

Source

fn white(&self) -> String

Makes the text white. Displays the text based on the corresponding style predefined by the terminal.

Source

fn bright_black(&self) -> String

Makes the text bright black. Displays the text based on the corresponding style predefined by the terminal.

Source

fn bright_red(&self) -> String

Makes the text bright red. Displays the text based on the corresponding style predefined by the terminal.

Source

fn bright_green(&self) -> String

Makes the text bright green. Displays the text based on the corresponding style predefined by the terminal.

Source

fn bright_yellow(&self) -> String

Makes the text bright yellow. Displays the text based on the corresponding style predefined by the terminal.

Source

fn bright_blue(&self) -> String

Makes the text bright blue. Displays the text based on the corresponding style predefined by the terminal.

Source

fn bright_magenta(&self) -> String

Makes the text bright magenta. Displays the text based on the corresponding style predefined by the terminal.

Source

fn bright_cyan(&self) -> String

Makes the text bright cyan. Displays the text based on the corresponding style predefined by the terminal.

Source

fn bright_white(&self) -> String

Makes the text bright white. Displays the text based on the corresponding style predefined by the terminal.

Source

fn black_bg(&self) -> String

Makes the background black. Displays the text based on the corresponding style predefined by the terminal.

Source

fn red_bg(&self) -> String

Makes the background red. Displays the text based on the corresponding style predefined by the terminal.

Source

fn green_bg(&self) -> String

Makes the background green. Displays the text based on the corresponding style predefined by the terminal.

Source

fn yellow_bg(&self) -> String

Makes the background yellow. Displays the text based on the corresponding style predefined by the terminal.

Source

fn blue_bg(&self) -> String

Makes the background blue. Displays the text based on the corresponding style predefined by the terminal.

Source

fn magenta_bg(&self) -> String

Makes the background magenta. Displays the text based on the corresponding style predefined by the terminal.

Source

fn cyan_bg(&self) -> String

Makes the background cyan. Displays the text based on the corresponding style predefined by the terminal.

Source

fn white_bg(&self) -> String

Makes the background white. Displays the text based on the corresponding style predefined by the terminal.

Source

fn bright_black_bg(&self) -> String

Makes the background bright black. Displays the text based on the corresponding style predefined by the terminal.

Source

fn bright_red_bg(&self) -> String

Makes the background bright red. Displays the text based on the corresponding style predefined by the terminal.

Source

fn bright_green_bg(&self) -> String

Makes the background bright green. Displays the text based on the corresponding style predefined by the terminal.

Source

fn bright_yellow_bg(&self) -> String

Makes the background bright yellow. Displays the text based on the corresponding style predefined by the terminal.

Source

fn bright_blue_bg(&self) -> String

Makes the background bright blue. Displays the text based on the corresponding style predefined by the terminal.

Source

fn bright_magenta_bg(&self) -> String

Makes the background bright magenta. Displays the text based on the corresponding style predefined by the terminal.

Source

fn bright_cyan_bg(&self) -> String

Makes the background bright cyan. Displays the text based on the corresponding style predefined by the terminal.

Source

fn bright_white_bg(&self) -> String

Makes the background bright white. Displays the text based on the corresponding style predefined by the terminal.

Source

fn orange(&self) -> String

Makes the text orange. Displays the text based on the corresponding style predefined by the terminal.

Source

fn orange_bg(&self) -> String

Makes the background orange. Displays the text based on the corresponding style predefined by the terminal.

Source

fn blueberry(&self) -> String

Makes the text blueberry. Displays the text based on the corresponding style predefined by the terminal.

Source

fn blueberry_bg(&self) -> String

Makes the background blueberry. Displays the text based on the corresponding style predefined by the terminal.

Source

fn pink(&self) -> String

Makes the text pink. Displays the text based on the corresponding style predefined by the terminal.

Source

fn pink_bg(&self) -> String

Makes the background pink. Displays the text based on the corresponding style predefined by the terminal.

Source

fn rgb(&self, Rgb: Rgb) -> String

Applies a foreground color to the string.

Source

fn rgb_bg(&self, Rgb: Rgb) -> String

Applies a background color to the string.

Source

fn style(&self) -> StyleBuilder

Creates a StyleBuilder, use it to combine multiple styles. Don’t forget to call build!

Source

fn deprecated(&self) -> String

Applies the italics and strikethrough styles.

Source

fn error(&self) -> String

Makes the text bold and red.

Source

fn warning(&self) -> String

Makes the text bold and yellow.

Source

fn success(&self) -> String

Makes the text bold and green.

Implementations on Foreign Types§

Source§

impl Stylize for &str

Source§

impl Stylize for Box<str>

Source§

impl Stylize for String

Implementors§