ComponentFactory

Trait ComponentFactory 

Source
pub trait ComponentFactory:
    Send
    + Sync
    + Debug {
    // Required methods
    fn create(
        &self,
        component_type: &str,
        config: &ComponentConfig,
    ) -> SklResult<Box<dyn PluginComponent>>;
    fn available_types(&self) -> Vec<String>;
    fn get_schema(&self, component_type: &str) -> Option<ComponentSchema>;
}
Expand description

Component factory for creating plugin instances

Required Methods§

Source

fn create( &self, component_type: &str, config: &ComponentConfig, ) -> SklResult<Box<dyn PluginComponent>>

Create a component

Source

fn available_types(&self) -> Vec<String>

List available component types

Source

fn get_schema(&self, component_type: &str) -> Option<ComponentSchema>

Get component schema

Implementors§