EventHandler

Trait EventHandler 

Source
pub trait EventHandler: Send + Sync {
    // Required method
    fn handle_event<'life0, 'async_trait>(
        &'life0 self,
        event: ExecutionEvent,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn handle_error<'life0, 'async_trait>(
        &'life0 self,
        error: String,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

Event handler trait

Implement this trait to receive execution events.

Required Methods§

Source

fn handle_event<'life0, 'async_trait>( &'life0 self, event: ExecutionEvent, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle an execution event

Provided Methods§

Source

fn handle_error<'life0, 'async_trait>( &'life0 self, error: String, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle error in event processing

Implementors§