Skip to main content

parse_bool_env_value

Function parse_bool_env_value 

Source
pub fn parse_bool_env_value(value: &str) -> Option<bool>
Expand description

Parse a boolean env-var value, returning None when unrecognized.

Accepted truthy values: 1, true, yes, on. Accepted falsy values: 0, false, no, off. Matching is case-insensitive after trimming whitespace. This is the canonical tri-state parser; do not fork the accepted-value set per crate.