[−][src]Function crossterm::style::style
pub fn style<'a, D: 'a>(val: D) -> StyledObject<D> where
D: Display + Clone,
Creates a StyledObject
.
This could be used to style any type that implements Display
with colors and text attributes.
See StyledObject
for more info.
Examples
use crossterm::{style, Color}; let styled_object = style("Blue colored text on yellow background") .with(Color::Blue) .on(Color::Yellow); println!("{}", styled_object);