Skip to main content

Colorize

Trait Colorize 

Source
pub trait Colorize {
Show 18 methods // Required method fn to_styled(&self) -> StyledString; // Provided methods fn red(&self) -> StyledString { ... } fn green(&self) -> StyledString { ... } fn yellow(&self) -> StyledString { ... } fn blue(&self) -> StyledString { ... } fn magenta(&self) -> StyledString { ... } fn cyan(&self) -> StyledString { ... } fn white(&self) -> StyledString { ... } fn bright_red(&self) -> StyledString { ... } fn bright_green(&self) -> StyledString { ... } fn bright_yellow(&self) -> StyledString { ... } fn bright_blue(&self) -> StyledString { ... } fn bright_magenta(&self) -> StyledString { ... } fn bright_cyan(&self) -> StyledString { ... } fn bright_white(&self) -> StyledString { ... } fn on_red(&self) -> StyledString { ... } fn bold(&self) -> StyledString { ... } fn dimmed(&self) -> StyledString { ... }
}
Expand description

Extension trait to add color methods to strings Uses AsRef<str> to work with both &str, String, and &String without moving

Required Methods§

Provided Methods§

Implementations on Foreign Types§

Source§

impl Colorize for str

Source§

impl Colorize for String

Implementors§