StandardConfig

Trait StandardConfig 

Source
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§

Source

fn validate(&self) -> SklResult<()>

Validate the configuration

Source

fn summary(&self) -> ConfigSummary

Get configuration summary

Source

fn to_params(&self) -> HashMap<String, ConfigValue>

Convert to parameter map for serialization

Source

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.

Implementors§