pub struct Style(_);
Expand description
A combinatorial style such as bold, italics, dimmed, etc.
Implementations§
source§impl Style
impl Style
sourcepub fn contains(self, style: Styles) -> bool
pub fn contains(self, style: Styles) -> bool
Check if the current style has one of Styles
switched on.
let colored = "".bold().italic();
assert_eq!(colored.style().contains(Styles::Bold), true);
assert_eq!(colored.style().contains(Styles::Italic), true);
assert_eq!(colored.style().contains(Styles::Dimmed), false);