pub trait Style {
    // Required methods
    fn paint(&self, text: &str, f: &mut Formatter<'_>) -> Result;
    fn paint_fn<'a>(
        &self,
        c: Box<dyn FnOnce(&mut Formatter<'_>) -> Result + 'a>,
        f: &mut Formatter<'_>
    ) -> Result;
    fn bold(&self) -> Box<dyn Style>;
}
Expand description

This trait implements a return value for the Stylesheet::get_style.

Required Methods§

source

fn paint(&self, text: &str, f: &mut Formatter<'_>) -> Result

The method used to write text with formatter

source

fn paint_fn<'a>( &self, c: Box<dyn FnOnce(&mut Formatter<'_>) -> Result + 'a>, f: &mut Formatter<'_> ) -> Result

The method used to write display function with formatter

source

fn bold(&self) -> Box<dyn Style>

The method used by the Formatter to display the message in bold font.

Implementors§