Function console::style

source ยท
pub fn style<D>(val: D) -> StyledObject<D>
Expand description

Wraps an object for formatting for styling.

Example:

format!("Hello {}", style("World").cyan());

This is a shortcut for making a new style and applying it to a value:

format!("Hello {}", Style::new().cyan().apply_to("World"));