pub struct ShouldColorize { /* private fields */ }
Expand description

A flag to to if coloring should occur.

Implementations

Reads environment variables and checks if output is a tty to determine whether colorization should be used or not. CLICOLOR_FORCE takes highest priority, followed by NO_COLOR, followed by CLICOLOR combined with tty check.

Returns if the current coloring is expected.

Use this to force colored to ignore the environment and always/never colorize

Remove the manual override and let the environment decide if it’s ok to colorize

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.