get_bool

Function get_bool 

Source
pub fn get_bool<T: AsRef<OsStr>>(name: T) -> Option<bool>
Expand description

Gets a boolean environment variable.

Returns None if the variable does not exist or the format is unrecognized.

Note: for optimization reasons, the functions caches values.

The cost of this function is amortized O(1) (thanks to the cache). Once a value is loaded it’s cached to avoid re-loading it. When a value is not loaded the cost of this function is O(nm) with n the number of items in the override path list and m the number of lines in each override file.