pub trait HttpFuture: Sealed {
type Body;
// Required method
fn poll_http(&mut self) -> Poll<Response<Self::Body>, Error>;
// Provided method
fn lift(self) -> LiftFuture<Self>
where Self: Sized { ... }
}Expand description
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.
Required Associated Types§
Required Methods§
Provided Methods§
Sourcefn lift(self) -> LiftFuture<Self>where
Self: Sized,
fn lift(self) -> LiftFuture<Self>where
Self: Sized,
Wraps self with LiftFuture. This provides an implementation of
Future for Self.