pub trait Session: 'static + Sync + Send + Sized {
    // Required method
    fn handle<'life0, 'async_trait>(
        &'life0 mut self,
        message: Message
    ) -> Pin<Box<dyn Future<Output = Result<Message, AgentError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn handle_socket<'life0, 'async_trait, S>(
        &'life0 mut self,
        adapter: Framed<S::Stream, MessageCodec>
    ) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>
       where S: ListeningSocket + Debug + Send + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

source

fn handle<'life0, 'async_trait>( &'life0 mut self, message: Message ) -> Pin<Box<dyn Future<Output = Result<Message, AgentError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

source

fn handle_socket<'life0, 'async_trait, S>( &'life0 mut self, adapter: Framed<S::Stream, MessageCodec> ) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>
where S: ListeningSocket + Debug + Send + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Object Safety§

This trait is not object safe.

Implementors§