Expand description
Safe environment variable parsing with defaults.
Functions§
- get
- Read a string environment variable.
- get_
bool - Safely parse boolean variables. Recognizes “true”, “1”, “yes”, “on” as true, and “false”, “0”, “no”, “off” as false. If the variable is unset or unrecognized, returns the fallback value.
- get_
non_ empty - Read a string environment variable and ignore empty values.
- get_or
- Read a string environment variable with a fallback value.
- get_
parsed - Read and parse an environment variable into any type implementing
FromStr. ReturnsNoneif the variable is not set or if parsing fails.