NodeFactory

Trait NodeFactory 

Source
pub trait NodeFactory: Send + Sync {
    // Required methods
    fn node_type(&self) -> &str;
    fn create(&self, config: &Value) -> Result<Box<dyn Node>>;
}
Expand description

A node factory that creates node instances from configuration.

Required Methods§

Source

fn node_type(&self) -> &str

Get the node type name this factory creates.

Source

fn create(&self, config: &Value) -> Result<Box<dyn Node>>

Create a new node instance from YAML configuration.

Implementors§