[][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>>

Notable traits for Pin<P>

impl<P> Future for Pin<P> where
    P: Unpin + DerefMut,
    <P as Deref>::Target: Future
type Output = <<P as Deref>::Target as Future>::Output;

    where
        T: 'a,
        B: 'a,
        R: 'a
; }

A trait implemented by asynchronous endpoint handlers.

Required methods

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>>

Notable traits for Pin<P>

impl<P> Future for Pin<P> where
    P: Unpin + DerefMut,
    <P as Deref>::Target: Future
type Output = <<P as Deref>::Target as Future>::Output;
where
    T: 'a,
    B: 'a,
    R: 'a, 
[src]

Handles an asynchronous request.

Loading content...

Implementors

Loading content...