Trait tower_web::util::http::HttpFuture [−][src]
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
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.
Provided Methods
fn lift(self) -> LiftFuture<Self> where
Self: Sized,
Self: Sized,
Wraps self with LiftFuture. This provides an implementation of
Future for Self.