Skip to main content

parse_env_bool

Function parse_env_bool 

Source
pub fn parse_env_bool(name: &str, default: bool) -> bool
Expand description

Parse a boolean environment variable, returning default when unset or unrecognized. Accepted truthy values: 1, true, yes, on. Accepted falsy values: 0, false, no, off. Matching is case-insensitive after trimming whitespace.