pub fn load_setting(
key: &str,
override_value: Option<String>,
default: Option<String>,
) -> Option<String>Expand description
Resolve a single setting value using the same precedence as upstream’s
load_settings:
override_value— an explicit value supplied by the caller (e.g. a constructor argument).- A
./.envfile in the current working directory, if present, looked up bykey. - The
keyprocess environment variable. default.
Returns None if none of the sources produced a value.
This is a dependency-free, single-key analogue of upstream’s
TypedDict-driven load_settings(); callers needing to resolve several
related fields can call this once per field.