[][src]Struct colored::control::ShouldColorize

pub struct ShouldColorize { /* fields omitted */ }

Methods

impl ShouldColorize[src]

pub fn from_env() -> Self[src]

Reads environment variables to determine whether colorization should be used or not. CLICOLOR_FORCE takes highest priority, followed by NO_COLOR, followed by CLICOLOR. In the absence of manual overrides, which take precedence over all environment variables, the priority of these variables can be expressed as follows.

NO_COLOR CLICOLOR CLICOLOR_FORCE colorize?
unset unset unset true (default)
unset != 0 unset true
unset == 0 unset false
set unset/== 0/!= 0 unset false
set/unset unset/== 0/!= 0 == 0 false
set/unset unset/== 0/!= 0 != 0 true

pub fn should_colorize(&self) -> bool[src]

pub fn set_override(&self, override_colorize: bool)[src]

pub fn unset_override(&self)[src]

Trait Implementations

impl Default for ShouldColorize[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]