[−][src]Function crossterm_style::style
pub fn style<'a, D: 'a>(val: D) -> StyledObject<D> where
D: Display,
This could be used to style a type who is implementing Display
with colors and attributes.
Example
// get an styled object which could be painted to the terminal. let styled_object = style("Some Blue colored text on black background") .with(Color::Blue) .on(Color::Black); // print the styled font * times to the current screen. for i in 1..10 { println!("{}", styled_object); }