Struct hexplay::color::Spec
[−]
[src]
pub struct Spec { /* fields omitted */ }
A color specification.
Methods
impl ColorSpec
[src]
pub fn new() -> ColorSpec
[src]
Create a new color specification that has no colors or styles.
pub fn fg(&self) -> Option<&Color>
[src]
Get the foreground color.
pub fn set_fg(&mut self, color: Option<Color>) -> &mut ColorSpec
[src]
Set the foreground color.
pub fn bg(&self) -> Option<&Color>
[src]
Get the background color.
pub fn set_bg(&mut self, color: Option<Color>) -> &mut ColorSpec
[src]
Set the background color.
pub fn bold(&self) -> bool
[src]
Get whether this is bold or not.
Note that the bold setting has no effect in a Windows console.
pub 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.
pub fn underline(&self) -> bool
[src]
Get whether this is underline or not.
Note that the underline setting has no effect in a Windows console.
pub 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.
pub 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.
pub 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.
pub fn is_none(&self) -> bool
[src]
Returns true if this color specification has no colors or styles.
pub fn clear(&mut self)
[src]
Clears this color specification so that it has no color/style settings.
Trait Implementations
impl Eq for ColorSpec
[src]
impl PartialEq<ColorSpec> for ColorSpec
[src]
fn eq(&self, __arg_0: &ColorSpec) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ColorSpec) -> bool
[src]
This method tests for !=
.
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
impl Debug for ColorSpec
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more