logo
pub struct Env<'a> { /* private fields */ }
Expand description

Set of environment variables to configure from.

Default environment variables

By default, the Env will read the following environment variables:

  • RUST_LOG: the level filter
  • RUST_LOG_STYLE: whether or not to print styles with records.

These sources can be configured using the builder methods on Env.

Implementations

Get a default set of environment variables.

Specify an environment variable to read the filter from.

Specify an environment variable to read the filter from.

If the variable is not set, the default value will be used.

Use the default environment variable to read the filter from.

If the variable is not set, the default value will be used.

Specify an environment variable to read the style from.

Specify an environment variable to read the style from.

If the variable is not set, the default value will be used.

Use the default environment variable to read the style from.

If the variable is not set, the default value will be used.

Trait Implementations

Formats the value using the given formatter. Read more

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

Converts to this type from the input type.

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.