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§
Sourcefn 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 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.
Sourcefn into_transport(self) -> Transport
fn into_transport(self) -> Transport
Consume this session handler into the underlying transport.