Trait mas_config::ConfigurationSection

source ·
pub trait ConfigurationSection: Sized + DeserializeOwned {
    const PATH: Option<&'static str> = None;

    // Provided methods
    fn validate(&self, _figment: &Figment) -> Result<(), FigmentError> { ... }
    fn extract(figment: &Figment) -> Result<Self, FigmentError> { ... }
}
Expand description

Trait implemented by all configuration section to help loading specific part of the config and generate the sample config.

Provided Associated Constants§

source

const PATH: Option<&'static str> = None

Specify where this section should live relative to the root.

Provided Methods§

source

fn validate(&self, _figment: &Figment) -> Result<(), FigmentError>

Validate the configuration section

§Errors

Returns an error if the configuration is invalid

source

fn extract(figment: &Figment) -> Result<Self, FigmentError>

Extract configuration from a Figment instance.

§Errors

Returns an error if the configuration could not be loaded

Object Safety§

This trait is not object safe.

Implementors§

source§

impl ConfigurationSection for AccountConfig

source§

const PATH: Option<&'static str> = _

source§

impl ConfigurationSection for AppConfig

source§

impl ConfigurationSection for BrandingConfig

source§

const PATH: Option<&'static str> = _

source§

impl ConfigurationSection for CaptchaConfig

source§

const PATH: Option<&'static str> = _

source§

impl ConfigurationSection for ClientsConfig

source§

const PATH: Option<&'static str> = _

source§

impl ConfigurationSection for DatabaseConfig

source§

const PATH: Option<&'static str> = _

source§

impl ConfigurationSection for EmailConfig

source§

const PATH: Option<&'static str> = _

source§

impl ConfigurationSection for ExperimentalConfig

source§

const PATH: Option<&'static str> = _

source§

impl ConfigurationSection for HttpConfig

source§

const PATH: Option<&'static str> = _

source§

impl ConfigurationSection for MatrixConfig

source§

const PATH: Option<&'static str> = _

source§

impl ConfigurationSection for PasswordsConfig

source§

const PATH: Option<&'static str> = _

source§

impl ConfigurationSection for PolicyConfig

source§

const PATH: Option<&'static str> = _

source§

impl ConfigurationSection for RateLimitingConfig

source§

const PATH: Option<&'static str> = _

source§

impl ConfigurationSection for RootConfig

source§

impl ConfigurationSection for SecretsConfig

source§

const PATH: Option<&'static str> = _

source§

impl ConfigurationSection for SyncConfig

source§

impl ConfigurationSection for TelemetryConfig

source§

const PATH: Option<&'static str> = _

source§

impl ConfigurationSection for TemplatesConfig

source§

const PATH: Option<&'static str> = _

source§

impl ConfigurationSection for UpstreamOAuth2Config

source§

const PATH: Option<&'static str> = _