Skip to main content

load_env

Function load_env 

Source
pub fn load_env<T>(prefix: &str) -> Result<T, FaucetError>
Expand description

Load a config struct from environment variables with a prefix.

Environment variable names are formed by uppercasing the field name and prepending the prefix with an underscore separator. For example, with prefix "BQ" and a field project_id, the env var BQ_PROJECT_ID is read.

Nested structs and enums are supported via envy’s deserialization.