pub trait StandardConfig:
Debug
+ Clone
+ Default {
// Required methods
fn validate(&self) -> SklResult<()>;
fn summary(&self) -> ConfigSummary;
fn to_params(&self) -> HashMap<String, ConfigValue>;
fn from_params(params: HashMap<String, ConfigValue>) -> SklResult<Self>;
}Expand description
Standard configuration trait that all components should implement
Required Methods§
Sourcefn summary(&self) -> ConfigSummary
fn summary(&self) -> ConfigSummary
Get configuration summary
Sourcefn to_params(&self) -> HashMap<String, ConfigValue>
fn to_params(&self) -> HashMap<String, ConfigValue>
Convert to parameter map for serialization
Sourcefn from_params(params: HashMap<String, ConfigValue>) -> SklResult<Self>
fn from_params(params: HashMap<String, ConfigValue>) -> SklResult<Self>
Create from parameter map
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.