[][src]Trait conjure_http::server::AsyncHandler

pub trait AsyncHandler<T, B, R> where
    T: Sync + Send,
    B: RequestBody + Send,
    B::BinaryBody: Send,
    R: AsyncVisitResponse + Send
{ fn handle<'a>(
        &self,
        service: &'a T,
        path_params: &'a PathParams,
        query_params: &'a QueryParams,
        headers: &'a HeaderMap,
        body: B,
        response_visitor: R
    ) -> Pin<Box<dyn Future<Output = Result<R::Output, Error>> + Send + 'a>>
    where
        T: 'a,
        B: 'a,
        R: 'a
; }

A trait implemented by asynchronous endpoint handlers.

Required methods

Important traits for Pin<P>
fn handle<'a>(
    &self,
    service: &'a T,
    path_params: &'a PathParams,
    query_params: &'a QueryParams,
    headers: &'a HeaderMap,
    body: B,
    response_visitor: R
) -> Pin<Box<dyn Future<Output = Result<R::Output, Error>> + Send + 'a>> where
    T: 'a,
    B: 'a,
    R: 'a, 

Handles an asynchronous request.

Loading content...

Implementors

Loading content...