Trait tower_web::util::http::HttpService[][src]

pub trait HttpService: Service {
    type RequestBody: BufStream;
    type ResponseBody: BufStream;
    type Error;
    type Future: Future<Item = Response<Self::ResponseBody>, Error = Self::Error>;
    fn poll_http_ready(&mut self) -> Poll<(), Self::Error>;
fn call_http(&mut self, request: Request<Self::RequestBody>) -> Self::Future; fn lift(self) -> LiftService<Self>
    where
        Self: Sized
, { ... } }

An HTTP service

This is not intended to be implemented directly. Instead, it is a trait alias of sorts, aliasing tower_service::Service trait with http::Request and http::Response types.

Associated Types

Request payload.

The HTTP response body type.

The service error type

The future response value.

Required Methods

Returns Ready when the service is able to process requests.

Process the request and return the response asynchronously.

Provided Methods

Wraps self with LiftService. This provides an implementation of Service for Self.

Implementors