Skip to main content

load_config_with_default

Function load_config_with_default 

Source
pub fn load_config_with_default<T>(
    get_env_var: impl Fn(&str) -> Option<String>,
    key: &str,
    default: T,
) -> T
where T: FromStr, <T as FromStr>::Err: Debug,
Expand description

Load a configuration value from the environment with a default.