Skip to main content

flag

Function flag 

Source
pub fn flag(key: &str) -> bool
Expand description

True when key is set to a truthy value. Truthy is anything except the explicit “off” spellings — empty, 0, false, no, off (trimmed, ASCII case-insensitive) — so both FOO=1 and FOO=yes enable, and FOO=0 actually disables instead of counting as “present, therefore on” (the trap the old env::var(..).is_ok() checks all shared).