mpc_client

Trait SessionEventHandler

Source
pub trait SessionEventHandler {
    // Required methods
    fn handle_event<'life0, 'async_trait>(
        &'life0 mut self,
        event: Event,
    ) -> Pin<Box<dyn Future<Output = Result<Option<SessionState>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn into_transport(self) -> Transport;
}
Expand description

Trait for types that handle session related events.

Required Methods§

Source

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

Handle an event.

Source

fn into_transport(self) -> Transport

Consume this session handler into the underlying transport.

Implementors§