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§
Sourcefn handle_event<'life0, 'async_trait>(
&'life0 self,
event: ExecutionEvent,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
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