ServerHandler

Trait ServerHandler 

Source
pub trait ServerHandler: Send + Sync {
    // Required methods
    fn handle_send_message<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 AppContext,
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn handle_pull_message<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 AppContext,
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn handle_request<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 AppContext,
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn handle_ack<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ctx: &'life1 AppContext,
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

服务端处理器

Required Methods§

Source

fn handle_send_message<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 AppContext, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

处理发送消息

Source

fn handle_pull_message<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 AppContext, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

处理拉取消息

Source

fn handle_request<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 AppContext, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

处理数据请求

Source

fn handle_ack<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 AppContext, ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

处理消息ack

Implementors§