[][src]Trait swagger::client::Service

pub trait Service {
    type ReqBody: Payload;
    type Future: Future;
    fn request(&self, req: Request<Self::ReqBody>) -> Self::Future;
}

Common trait for swagger based client middleware

Associated Types

type ReqBody: Payload

Request body taken by client. Likely either hyper::Body, hyper::Chunk or swagger::ContextualPayload.

type Future: Future

Future response from client service. Likely: Future<Item=hyper::Response<hyper::Body>, Error=hyper::Error>

Loading content...

Required methods

fn request(&self, req: Request<Self::ReqBody>) -> Self::Future

Handle the given request

Loading content...

Implementations on Foreign Types

impl<C, B> Service for Client<C, B> where
    B: Payload + Send + 'static,
    B::Data: Send,
    C: Connect + Sync + 'static,
    C::Transport: 'static,
    C::Future: 'static, 
[src]

type ReqBody = B

type Future = ResponseFuture

Loading content...

Implementors

impl<T, C> Service for DropContextService<T, C> where
    C: Send + 'static,
    T: Service<ReqBody = Body>, 
[src]

type ReqBody = ContextualPayload<Body, C>

type Future = T::Future

Loading content...