Skip to main content

SessionHandler

Trait SessionHandler 

Source
pub trait SessionHandler: Send + 'static {
    // Required method
    fn deliver(&mut self, envelope: Envelope) -> impl Future<Output = ()> + Send;

    // Provided method
    fn stream_closed(
        &mut self,
        _operation: ClientOperationId,
    ) -> impl Future<Output = ()> + Send { ... }
}

Required Methods§

Source

fn deliver(&mut self, envelope: Envelope) -> impl Future<Output = ()> + Send

Provided Methods§

Source

fn stream_closed( &mut self, _operation: ClientOperationId, ) -> impl Future<Output = ()> + Send

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl SessionHandler for ()

Source§

async fn deliver(&mut self, _envelope: Envelope)

Source§

impl SessionHandler for Sender<Envelope>

Source§

async fn deliver(&mut self, envelope: Envelope)

Source§

impl SessionHandler for Sender<Envelope>

Source§

async fn deliver(&mut self, envelope: Envelope)

Implementors§