Struct Env
pub struct Env<'a> { /* private fields */ }
Set of environment variables to configure from.
Default environment variables
By default, the Env will read the following environment variables:
RUST_LOG: the level filterRUST_LOG_STYLE: whether or not to print styles with records.
These sources can be configured using the builder methods on Env.
Implementations
impl<'a> Env<'a>
fn new() -> SelfGet a default set of environment variables.
fn filter<E>(self, filter_env: E) -> Self where E: Into<Cow<'a, str>>,Specify an environment variable to read the filter from.
fn filter_or<E, V>(self, filter_env: E, default: V) -> Self where E: Into<Cow<'a, str>>, V: Into<Cow<'a, str>>,Specify an environment variable to read the filter from.
If the variable is not set, the default value will be used.
fn default_filter_or<V>(self, default: V) -> Self where V: Into<Cow<'a, str>>,Use the default environment variable to read the filter from.
If the variable is not set, the default value will be used.
fn write_style<E>(self, write_style_env: E) -> Self where E: Into<Cow<'a, str>>,Specify an environment variable to read the style from.
fn write_style_or<E, V>(self, write_style_env: E, default: V) -> Self where E: Into<Cow<'a, str>>, V: Into<Cow<'a, str>>,Specify an environment variable to read the style from.
If the variable is not set, the default value will be used.
fn default_write_style_or<V>(self, default: V) -> Self where V: Into<Cow<'a, str>>,Use the default environment variable to read the style from.
If the variable is not set, the default value will be used.
Trait Implementations
impl Default for Env<'_>
fn default() -> Self
impl<'a> Debug for Env<'a>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<'a, T> From<T> for Env<'a>
where
T: Into<Cow<'a, str>>,
fn from(filter_env: T) -> Self