pub trait ResponseHandler: Clone + Send + Sync + Unpin + 'static {
    // Required method
    fn send_response<'a, 'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        response: MessageResponse<'life1, 'a, impl 'async_trait + Iterator<Item = &'a Record> + Send + 'a, impl 'async_trait + Iterator<Item = &'a Record> + Send + 'a, impl 'async_trait + Iterator<Item = &'a Record> + Send + 'a, impl 'async_trait + Iterator<Item = &'a Record> + Send + 'a>
    ) -> Pin<Box<dyn Future<Output = Result<ResponseInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

A handler for send a response to a client

Required Methods§

source

fn send_response<'a, 'life0, 'life1, 'async_trait>( &'life0 mut self, response: MessageResponse<'life1, 'a, impl 'async_trait + Iterator<Item = &'a Record> + Send + 'a, impl 'async_trait + Iterator<Item = &'a Record> + Send + 'a, impl 'async_trait + Iterator<Item = &'a Record> + Send + 'a, impl 'async_trait + Iterator<Item = &'a Record> + Send + 'a> ) -> Pin<Box<dyn Future<Output = Result<ResponseInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Serializes and sends a message to to the wrapped handle

self is consumed as only one message should ever be sent in response to a Request

Object Safety§

This trait is not object safe.

Implementors§