Struct termcolor::ColorSpec
[−]
[src]
pub struct ColorSpec { /* fields omitted */ }
A color specification.
Methods
impl ColorSpec
[src]
fn new() -> ColorSpec
Create a new color specification that has no colors or styles.
fn fg(&self) -> Option<&Color>
Get the foreground color.
fn set_fg(&mut self, color: Option<Color>) -> &mut ColorSpec
Set the foreground color.
fn bg(&self) -> Option<&Color>
Get the background color.
fn set_bg(&mut self, color: Option<Color>) -> &mut ColorSpec
Set the background color.
fn bold(&self) -> bool
Get whether this is bold or not.
fn set_bold(&mut self, yes: bool) -> &mut ColorSpec
Set whether the text is bolded or not.
fn is_none(&self) -> bool
Returns true if this color specification has no colors or styles.
fn clear(&mut self)
Clears this color specification so that it has no color/style settings.
Trait Implementations
impl Clone for ColorSpec
[src]
fn clone(&self) -> ColorSpec
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more