#[non_exhaustive]pub enum ColorMode {
Auto,
Always,
Never,
}Expand description
Whether to write colour, as the caller asked.
Always and Never ignore the variables
that decide whether to write colour, NO_COLOR, CLICOLOR,
CLICOLOR_FORCE, FORCE_COLOR, and TERM=dumb, and ask no stream. The
depth and the width still follow their variables. Auto
follows the order in the Colour section of the crate docs.
ctl-core’s own ColorMode, which its --color flag parses to, converts
into this type with From.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Auto
Decide from the environment and the stream.
Always
Write colour whatever the environment holds.
Never
Write no colour whatever the environment holds.
Trait Implementations§
impl Copy for ColorMode
impl Eq for ColorMode
impl StructuralPartialEq for ColorMode
Auto Trait Implementations§
impl Forget for ColorMode
impl Freeze for ColorMode
impl RefUnwindSafe for ColorMode
impl Send for ColorMode
impl Sync for ColorMode
impl Unpin for ColorMode
impl UnsafeUnpin for ColorMode
impl UnwindSafe for ColorMode
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