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

pub trait HttpFuture: Sealed {
    type Body;
    fn poll_http(&mut self) -> Poll<Response<Self::Body>, Error>;

    fn lift(self) -> LiftFuture<Self>
    where
        Self: Sized
, { ... } }

HTTP response future trait

A trait "alias" for Future where the yielded item is an http::Response.

Using HttpFuture in where bounds is easier than trying to use Future directly.

Associated Types

type Body

The HTTP response body

Loading content...

Required methods

fn poll_http(&mut self) -> Poll<Response<Self::Body>, Error>

Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available.

Loading content...

Provided methods

fn lift(self) -> LiftFuture<Self> where
    Self: Sized

Wraps self with LiftFuture. This provides an implementation of Future for Self.

Loading content...

Implementors

impl<T, B> HttpFuture for T where
    T: Future<Item = Response<B>, Error = Error>, 
[src]

type Body = B

fn lift(self) -> LiftFuture<Self> where
    Self: Sized
[src]

Loading content...