[][src]Trait crossterm::style::Styler

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

Provides a set of methods to set the text attributes.

Method names correspond to the Attribute enum variants.

Examples

use crossterm::style::Styler;

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

Required methods

fn reset(self) -> StyledContent<D>

fn bold(self) -> StyledContent<D>

fn underlined(self) -> StyledContent<D>

fn reverse(self) -> StyledContent<D>

fn dim(self) -> StyledContent<D>

fn italic(self) -> StyledContent<D>

fn negative(self) -> StyledContent<D>

fn hidden(self) -> StyledContent<D>

fn crossed_out(self) -> StyledContent<D>

Loading content...

Implementations on Foreign Types

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

Loading content...

Implementors

impl<D: Display + Clone> Styler<D> for StyledContent<D>[src]

Loading content...