[][src]Trait crossterm_style::Styler

pub trait Styler<D: Display> {
    fn reset(self) -> StyledObject<D>;
fn bold(self) -> StyledObject<D>;
fn underlined(self) -> StyledObject<D>;
fn reverse(self) -> StyledObject<D>;
fn dim(self) -> StyledObject<D>;
fn italic(self) -> StyledObject<D>;
fn negative(self) -> StyledObject<D>;
fn slow_blink(self) -> StyledObject<D>;
fn rapid_blink(self) -> StyledObject<D>;
fn hidden(self) -> StyledObject<D>;
fn crossed_out(self) -> StyledObject<D>; }

Provides a set of methods to style any type implementing Display with attributes.

This trait is implemented for &static str and StyledObject and thus the methods of this trait could be called on them.


use Colorizer;

println!("{}", "Bold text".bold();
println!("{}", "Underlined text".underlined();
println!("{}", "Negative text".negative();

Required methods

fn reset(self) -> StyledObject<D>

fn bold(self) -> StyledObject<D>

fn underlined(self) -> StyledObject<D>

fn reverse(self) -> StyledObject<D>

fn dim(self) -> StyledObject<D>

fn italic(self) -> StyledObject<D>

fn negative(self) -> StyledObject<D>

fn hidden(self) -> StyledObject<D>

fn crossed_out(self) -> StyledObject<D>

Loading content...

Implementations on Foreign Types

impl Styler<&'static str> for &'static str[src]

Loading content...


impl<D: Display> Styler<D> for StyledObject<D>[src]

Loading content...