Trait annotate_snippets::formatter::style::Style
source · 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§
sourcefn paint(&self, text: &str, f: &mut Formatter<'_>) -> Result
fn paint(&self, text: &str, f: &mut Formatter<'_>) -> Result
The method used to write text with formatter