Function de_lobby::conf::var

source ·
fn var<T>(name: &str, default: Option<T>) -> Result<T>
where T: FromStr, <T as FromStr>::Err: Error + Send + Sync + 'static,
Expand description

Load and parse the value of an environment variable.

§Arguments

  • name - name of the environment variable to load.

  • default - default value to use if the environment variable is not set. An error is returned if both the env variable is not set and the default value is None.