pub trait ComponentFactory: Send + Sync {
// Required methods
fn create_component(
&self,
config: &ComponentConfig,
) -> SklResult<Box<dyn PluggableComponent>>;
fn supported_types(&self) -> Vec<String>;
fn validate_config(&self, config: &ComponentConfig) -> SklResult<()>;
fn factory_metadata(&self) -> FactoryMetadata;
}Expand description
Component factory trait for creating components
Required Methods§
Sourcefn create_component(
&self,
config: &ComponentConfig,
) -> SklResult<Box<dyn PluggableComponent>>
fn create_component( &self, config: &ComponentConfig, ) -> SklResult<Box<dyn PluggableComponent>>
Create a new component instance
Sourcefn supported_types(&self) -> Vec<String>
fn supported_types(&self) -> Vec<String>
Get supported component types
Sourcefn validate_config(&self, config: &ComponentConfig) -> SklResult<()>
fn validate_config(&self, config: &ComponentConfig) -> SklResult<()>
Validate component configuration
Sourcefn factory_metadata(&self) -> FactoryMetadata
fn factory_metadata(&self) -> FactoryMetadata
Get factory metadata