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§
Sourcefn options() -> Vec<ConfigOptionDef<String>>
fn options() -> Vec<ConfigOptionDef<String>>
Get all configuration options for this section
Sourcefn from_config<'de, D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
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.