pub struct ColorSpec { /* private fields */ }
Expand description
A color specification.
Implementations
sourceimpl ColorSpec
impl ColorSpec
sourcepub fn bold(&self) -> bool
pub fn bold(&self) -> bool
Get whether this is bold or not.
Note that the bold setting has no effect in a Windows console.
sourcepub fn set_bold(&mut self, yes: bool) -> &mut ColorSpec
pub fn set_bold(&mut self, yes: bool) -> &mut ColorSpec
Set whether the text is bolded or not.
Note that the bold setting has no effect in a Windows console.
sourcepub fn dimmed(&self) -> bool
pub fn dimmed(&self) -> bool
Get whether this is dimmed or not.
Note that the dimmed setting has no effect in a Windows console.
sourcepub fn set_dimmed(&mut self, yes: bool) -> &mut ColorSpec
pub fn set_dimmed(&mut self, yes: bool) -> &mut ColorSpec
Set whether the text is dimmed or not.
Note that the dimmed setting has no effect in a Windows console.
sourcepub fn italic(&self) -> bool
pub fn italic(&self) -> bool
Get whether this is italic or not.
Note that the italic setting has no effect in a Windows console.
sourcepub fn set_italic(&mut self, yes: bool) -> &mut ColorSpec
pub fn set_italic(&mut self, yes: bool) -> &mut ColorSpec
Set whether the text is italicized or not.
Note that the italic setting has no effect in a Windows console.
sourcepub fn underline(&self) -> bool
pub fn underline(&self) -> bool
Get whether this is underline or not.
Note that the underline setting has no effect in a Windows console.
sourcepub fn set_underline(&mut self, yes: bool) -> &mut ColorSpec
pub fn set_underline(&mut self, yes: bool) -> &mut ColorSpec
Set whether the text is underlined or not.
Note that the underline setting has no effect in a Windows console.
sourcepub fn reset(&self) -> bool
pub fn reset(&self) -> bool
Get whether reset is enabled or not.
reset is enabled by default. When disabled and using ANSI escape
sequences, a “reset” code will be emitted every time a ColorSpec
’s
settings are applied.
Note that the reset setting has no effect in a Windows console.
sourcepub fn set_reset(&mut self, yes: bool) -> &mut ColorSpec
pub fn set_reset(&mut self, yes: bool) -> &mut ColorSpec
Set whether to reset the terminal whenever color settings are applied.
reset is enabled by default. When disabled and using ANSI escape
sequences, a “reset” code will be emitted every time a ColorSpec
’s
settings are applied.
Typically this is useful if callers have a requirement to more scrupulously manage the exact sequence of escape codes that are emitted when using ANSI for colors.
Note that the reset setting has no effect in a Windows console.
sourcepub fn intense(&self) -> bool
pub fn intense(&self) -> bool
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.
sourcepub fn set_intense(&mut self, yes: bool) -> &mut ColorSpec
pub fn set_intense(&mut self, yes: bool) -> &mut ColorSpec
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.
Trait Implementations
impl Eq for ColorSpec
impl StructuralEq for ColorSpec
impl StructuralPartialEq for ColorSpec
Auto Trait Implementations
impl RefUnwindSafe for ColorSpec
impl Send for ColorSpec
impl Sync for ColorSpec
impl Unpin for ColorSpec
impl UnwindSafe for ColorSpec
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more