Module from_env

Source
Expand description

FromEnv, FromEnvVar traits and related utilities.

Structs§

EnvItemInfo
Details about an environment variable. This is used to generate documentation for the environment variables and by the FromEnv trait to check if necessary environment variables are present.

Enums§

FromEnvErr
Error type for loading from the environment. See the FromEnv trait for more information.

Traits§

FromEnv
Trait for loading from the environment.
FromEnvVar
Trait for loading primitives from the environment. These are simple types that should correspond to a single environment variable. It has been implemented for common integer types, String, url::Url, tracing::Level, and std::time::Duration.

Functions§

parse_env_if_present
Convenience function for parsing a value from the environment, if present and non-empty.

Derive Macros§

FromEnv
The derive(FromEnv) macro.