Function crossterm::style [−][src]
pub fn style<'a, D: 'a>(val: D) -> StyledObject<D> where
D: Display,
This could be used to style an Displayable with colors and attributes.
use crossterm::Screen; // 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); // create an default screen. let screen = Screen::default(); // print the styled font * times to the current screen. for i in 1..10 { styled_object.paint(&screen); }