Trait EventTrait

Source
pub trait EventTrait {
    // Required methods
    fn new() -> Self
       where Self: Sized;
    fn get_type(&self) -> &str;
    fn validate(&self, params: &HashMap<String, Value>) -> Result<(), String>;
    fn trigger<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 mut self,
        params: &'life1 HashMap<String, Value>,
        facts: &'life2 (dyn ErasedSerialize + Sync),
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
}

Required Methods§

Source

fn new() -> Self
where Self: Sized,

Source

fn get_type(&self) -> &str

Source

fn validate(&self, params: &HashMap<String, Value>) -> Result<(), String>

Source

fn trigger<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, params: &'life1 HashMap<String, Value>, facts: &'life2 (dyn ErasedSerialize + Sync), ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Implementors§