mas_config

Trait ConfigurationSectionExt

Source
pub trait ConfigurationSectionExt: ConfigurationSection + Default {
    // Provided method
    fn extract_or_default(figment: &Figment) -> Result<Self, Error> { ... }
}
Expand description

Extension trait for ConfigurationSection to allow extracting the configuration section from a Figment or return the default value if the section is not present.

Provided Methods§

Source

fn extract_or_default(figment: &Figment) -> Result<Self, Error>

Extract the configuration section from the given Figment, or return the default value if the section is not present.

§Errors

Returns an error if the configuration section is invalid.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§