Trait hickory_server::server::RequestHandler

source ·
pub trait RequestHandler: Send + Sync + Unpin + 'static {
    // Required method
    fn handle_request<'life0, 'life1, 'async_trait, R>(
        &'life0 self,
        request: &'life1 Request,
        response_handle: R
    ) -> Pin<Box<dyn Future<Output = ResponseInfo> + Send + 'async_trait>>
       where R: 'async_trait + ResponseHandler,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Trait for handling incoming requests, and providing a message response.

Required Methods§

source

fn handle_request<'life0, 'life1, 'async_trait, R>( &'life0 self, request: &'life1 Request, response_handle: R ) -> Pin<Box<dyn Future<Output = ResponseInfo> + Send + 'async_trait>>
where R: 'async_trait + ResponseHandler, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Determines what needs to happen given the type of request, i.e. Query or Update.

§Arguments
  • request - the requested action to perform.
  • response_handle - handle to which a return message should be sent

Object Safety§

This trait is not object safe.

Implementors§