pub struct Style {
pub foreground: Option<Color>,
pub background: Option<Color>,
pub font_style: FontStyle,
}
Expand description
A foreground color, background color and font-style.
Fields
foreground: Option<Color>
background: Option<Color>
font_style: FontStyle
Implementations
sourceimpl Style
impl Style
sourcepub fn from_ansi_sequence(code: &str) -> Option<Style>
pub fn from_ansi_sequence(code: &str) -> Option<Style>
Parse ANSI escape sequences like 38;2;255;0;100;1;4
(pink, bold, underlined).
sourcepub fn to_ansi_term_style(&self) -> Style
pub fn to_ansi_term_style(&self) -> Style
Convert to a ansi_term::Style
(if the ansi_term
feature is enabled).
Trait Implementations
impl StructuralPartialEq for Style
Auto Trait Implementations
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnwindSafe for Style
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more