Skip to main content

apply_env_at_path

Function apply_env_at_path 

Source
pub fn apply_env_at_path(
    base: &mut Value,
    env_vars: &[&str],
    path: &[&str],
    decode: EnvDecode,
    overwrite: bool,
) -> Result<(), String>
Expand description

Decodes one key from the process environment into base at the supplied path.

Reads the first non-empty variable named in env_vars. When overwrite is false, existing values win.

ยงErrors

Returns a message when the environment value is malformed for decode.