Function parse_or_default
Source pub fn parse_or_default<T: FromStr + Default>(name: &str) -> Result<T, Error>
Expand description
Like parse, but falls back to a default value when
the environment variable is missing or empty.
The target type must implement Default.
ยงErrors
Returns an error if the requested environment variable contains invalid
UTF-8 or has a value that cannot be parsed into the target type.