Skip to main content

env_parse_or

Function env_parse_or 

Source
pub fn env_parse_or<T>(name: &str, default: T) -> T
where T: FromStr,
Expand description

Read once and parse the exact Unicode value, without trimming or caching.

Missing, non-Unicode and unparseable values use default. Values accepted by T::from_str, including non-finite floats, need any caller-specific checks.