Trait trust_dns_server::server::RequestHandler
source · [−]pub trait RequestHandler: Send + Sync + Unpin + 'static {
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,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}
Expand description
Trait for handling incoming requests, and providing a message response.
Required methods
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,
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
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,
'life0: 'async_trait,
'life1: 'async_trait,
Self: '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