Skip to main content

Normalize

Trait Normalize 

Source
pub trait Normalize {
    // Provided method
    fn normalize(&mut self) { ... }
}
Expand description

Trait for config normalisation after all sources are merged.

Normalisation handles implied settings that should apply regardless of how a value arrived (YAML, env var, CLI arg). For example, setting SASL credentials implies sasl.enabled = true.

Called after: YAML -> figment env -> flat env overrides. Called before: validate().

Provided Methods§

Source

fn normalize(&mut self)

Normalise config: infer implied settings, set defaults based on other fields.

Implementors§