Skip to main content

Module env

Module env 

Source

Structsยง

EnvError
Errors raised by environment-variable helpers in this crate.
EnvLoader
Loads environment variables with a common prefix, supporting required, optional, and secret values.
ProcessEnvironment
Adapter backed by the current process environment.
ProjectIdentity
Identifies an application for platform-specific project directories.

Enumsยง

EnvErrorKind ๐Ÿ”’
ProjectDirectory ๐Ÿ”’

Traitsยง

Environment
Source of process-style key/value configuration.

Functionsยง

config_dir
Return the platform-specific config directory, checking an env override first.
data_dir
Return the platform-specific data directory, checking an env override first.
ensure_query_param
Append a query parameter to a URL if it is not already present.
env_or
Read an environment variable, returning a default if not set.
env_or_with
Read a value through an injected environment, returning a default when absent.
get_raw_env
Read an unprefixed value from the process environment.
project_dir_with ๐Ÿ”’
require_env
Read a required environment variable.
require_env_with
Read a required value through an injected environment.