Struct termcolor::ColorSpec
[−]
[src]
pub struct ColorSpec { /* fields omitted */ }
A color specification.
Methods
impl ColorSpec
[src]
fn new() -> ColorSpec
[src]
Create a new color specification that has no colors or styles.
fn fg(&self) -> Option<&Color>
[src]
Get the foreground color.
fn set_fg(&mut self, color: Option<Color>) -> &mut ColorSpec
[src]
Set the foreground color.
fn bg(&self) -> Option<&Color>
[src]
Get the background color.
fn set_bg(&mut self, color: Option<Color>) -> &mut ColorSpec
[src]
Set the background color.
fn bold(&self) -> bool
[src]
Get whether this is bold or not.
Note that the bold setting has no effect in a Windows console.
fn set_bold(&mut self, yes: bool) -> &mut ColorSpec
[src]
Set whether the text is bolded or not.
Note that the bold setting has no effect in a Windows console.
fn underline(&self) -> bool
[src]
Get whether this is underline or not.
Note that the underline setting has no effect in a Windows console.
fn set_underline(&mut self, yes: bool) -> &mut ColorSpec
[src]
Set whether the text is underlined or not.
Note that the underline setting has no effect in a Windows console.
fn intense(&self) -> bool
[src]
Get whether this is intense or not.
On Unix-like systems, this will output the ANSI escape sequence that will print a high-intensity version of the color specified.
On Windows systems, this will output the ANSI escape sequence that will print a brighter version of the color specified.
fn set_intense(&mut self, yes: bool) -> &mut ColorSpec
[src]
Set whether the text is intense or not.
On Unix-like systems, this will output the ANSI escape sequence that will print a high-intensity version of the color specified.
On Windows systems, this will output the ANSI escape sequence that will print a brighter version of the color specified.
fn is_none(&self) -> bool
[src]
Returns true if this color specification has no colors or styles.
fn clear(&mut self)
[src]
Clears this color specification so that it has no color/style settings.
Trait Implementations
impl Clone for ColorSpec
[src]
fn clone(&self) -> ColorSpec
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more