Skip to main content

Module env

Module env 

Source
Expand description

Small environment-variable helpers shared by the kernel + every app crate’s config loader. Single source of truth so parsing behavior (empty-string filtering, bool truthiness) stays identical everywhere. Treats an empty/whitespace value the same as unset.

Functions§

parse_bool
Truthy-string bool (1|true|yes|on), or default when unset.
parse_or
Parse key into T, falling back to default when unset/empty/unparseable.
var
The trimmed value of key, or None when unset/empty.
var_or
var(key) or a string default.