Trait mas_config::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.

Object Safety§

This trait is not object safe.

Implementors§