Skip to main content

parse_daemon_bool

Function parse_daemon_bool 

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

The boolean grammar of shep.toml and the SHEP_* environment: 1, 0, true, false, and nothing else.

One function so the file/env layer and the --log-json flag cannot drift. clap’s own BoolishValueParser additionally accepts yes/no/y/n/on/off; using it would widen the grammar on the flag side only.

Not a general boolean parser: exporting it only under this name keeps exactly one answer to what counts as true in shep’s daemon config.