Crate better_config Copy item path Source utils Error AbstractConfig EnvConfig Indicates that structure can be initialize from environment variables. IniConfig Indicates that structure can be initialized from an INI file. JsonConfig Indicates that structure can be initialized from a JSON file. TomlConfig Indicates that structure can be initialized from TOML files. YmlConfig Indicates that structure can be initialized from a YAML/YML file. get Get the value of the environment variable key
as T
.
If the variable is not set or cannot be parsed, it panics with a message. get_optional Get the value of the environment variable key
as T
.
If the variable is not set or cannot be parsed, it returns None
.
/// # Example get_optional_or Get the value of the environment variable key
as T
.
If the variable is not set or cannot be parsed, it returns default
. get_optional_or_else Get the value of the environment variable key
as T
.
If the variable is not set or cannot be parsed, it returns the result of f
. get_or Get the value of the environment variable key
as T
.
If the variable is not set or cannot be parsed, it returns default
. get_or_else Get the value of the environment variable key
as T
.
If the variable is not set or cannot be parsed, it returns the result of f
. get_or_else_with_hashmap Get the value of the environment variable key
as T
from a provided hashmap.
If the variable is not set or cannot be parsed, it returns the result of f
. get_or_with_hashmap Get the value of the environment variable key
as T
from a provided hashmap.
If the variable is not set or cannot be parsed, it returns default
. env