pub fn var_parse_opt<T>(name: &str) -> Result<Option<T>>Expand description
Get an optional environment variable parsed as a specific type
§Returns
Ok(Some(value))if the variable exists and parses successfullyOk(None)if the variable doesn’t existErr(EnvError::ParseError)if the variable exists but can’t be parsed
§Errors
- If the environment variable exists but cannot be parsed to the target type