TriggerFactory

Trait TriggerFactory 

Source
pub trait TriggerFactory: Send + Sync {
    // Required methods
    fn trigger_type(&self) -> TriggerType;
    fn create(&self, config: &TriggerConfig) -> Result<Box<dyn Trigger>>;
}
Expand description

A trigger factory that creates trigger instances from configuration.

Required Methods§

Source

fn trigger_type(&self) -> TriggerType

Get the trigger type this factory creates.

Source

fn create(&self, config: &TriggerConfig) -> Result<Box<dyn Trigger>>

Create a new trigger instance from configuration.

Implementors§