[][src]Trait crossterm::Styler

pub trait Styler<D> where
    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> Styler<D> for StyledObject<D> where
    D: Display

Loading content...