pub enum ColorChoice {
Auto,
AlwaysAnsi,
Always,
Never,
}
Expand description
Selection for overriding color output Selection for overriding color output
Variants§
Auto
Use colors if the output device appears to support them
AlwaysAnsi
Like Always
, except it never tries to use anything other than emitting ANSI
color codes.
Always
Try very hard to emit colors.
This includes emitting ANSI colors on Windows if the console API is unavailable.
Never
Never emit colors.
Implementations§
Source§impl ColorChoice
impl ColorChoice
Sourcepub fn global() -> ColorChoice
pub fn global() -> ColorChoice
Get the current ColorChoice
state
Sourcepub fn write_global(self)
pub fn write_global(self)
Override the detected ColorChoice
Trait Implementations§
Source§impl Clone for ColorChoice
impl Clone for ColorChoice
Source§fn clone(&self) -> ColorChoice
fn clone(&self) -> ColorChoice
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ColorChoice
impl Debug for ColorChoice
Source§impl Default for ColorChoice
impl Default for ColorChoice
Source§fn default() -> ColorChoice
fn default() -> ColorChoice
Returns the “default value” for a type. Read more
Source§impl PartialEq for ColorChoice
impl PartialEq for ColorChoice
impl Copy for ColorChoice
impl Eq for ColorChoice
impl StructuralPartialEq for ColorChoice
Auto Trait Implementations§
impl Freeze for ColorChoice
impl RefUnwindSafe for ColorChoice
impl Send for ColorChoice
impl Sync for ColorChoice
impl Unpin for ColorChoice
impl UnwindSafe for ColorChoice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more