Skip to main content

ConfigSection

Trait ConfigSection 

Source
pub trait ConfigSection: Sized + Default {
    // Required methods
    fn options() -> Vec<ConfigOptionDef<String>>;
    fn from_config<'de, D>(deserializer: D) -> Result<Self, D::Error>
       where D: Deserializer<'de>;
}
Expand description

Trait for configuration sections that can be loaded from multiple sources

Required Methods§

Source

fn options() -> Vec<ConfigOptionDef<String>>

Get all configuration options for this section

Source

fn from_config<'de, D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Create a new instance from a config file section

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§