Skip to main content

load_with_env_overrides

Function load_with_env_overrides 

Source
pub fn load_with_env_overrides(
    path: Option<&Path>,
) -> Result<Config, ConfigError>
Expand description

Load config with env-var overrides applied on top of file values. Returns Config::default() if path is None or the file doesn’t exist.

Env var precedence per Client spec rev1 §5:

  • CLEANLIBRARY_API_KEYauth.api_key
  • CLEANLIBRARY_ENDPOINTendpoint.url
  • CLEANLIBRARY_API_VERSIONendpoint.api_version
  • CLEANLIBRARY_TELEMETRY (0/1/true/false) → telemetry.enabled