EventHandler

Trait EventHandler 

Source
pub trait EventHandler {
    type InputEvent;
    type OutputEvent: Clone + Send + Sync + 'static;
    type Error: Debug + Send + Sync + 'static;

    // Required method
    fn handle_event<'life0, 'async_trait>(
        &'life0 mut self,
        input: Self::InputEvent,
    ) -> Pin<Box<dyn Future<Output = OutputEvent<Self::OutputEvent, Self::Error>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

Source

type InputEvent

Source

type OutputEvent: Clone + Send + Sync + 'static

Source

type Error: Debug + Send + Sync + 'static

Required Methods§

Source

fn handle_event<'life0, 'async_trait>( &'life0 mut self, input: Self::InputEvent, ) -> Pin<Box<dyn Future<Output = OutputEvent<Self::OutputEvent, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§