pub struct DeflateService<S> { /* private fields */ }Expand description
Deflates the inner service’s response bodies.
Trait Implementations§
Source§impl<S: Debug> Debug for DeflateService<S>
impl<S: Debug> Debug for DeflateService<S>
Source§impl<S, RequestBody, ResponseBody> Service for DeflateService<S>
impl<S, RequestBody, ResponseBody> Service for DeflateService<S>
Source§type Response = Response<CompressStream<ResponseBody>>
type Response = Response<CompressStream<ResponseBody>>
Responses given by the service.
Source§fn poll_ready(&mut self) -> Poll<(), Self::Error>
fn poll_ready(&mut self) -> Poll<(), Self::Error>
Returns
Ready when the service is able to process requests. Read moreAuto Trait Implementations§
impl<S> Freeze for DeflateService<S>where
S: Freeze,
impl<S> RefUnwindSafe for DeflateService<S>where
S: RefUnwindSafe,
impl<S> Send for DeflateService<S>where
S: Send,
impl<S> Sync for DeflateService<S>where
S: Sync,
impl<S> Unpin for DeflateService<S>where
S: Unpin,
impl<S> UnwindSafe for DeflateService<S>where
S: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T, B1, B2> HttpService for T
impl<T, B1, B2> HttpService for T
Source§type RequestBody = B1
type RequestBody = B1
Request payload.
Source§type ResponseBody = B2
type ResponseBody = B2
The HTTP response body type.
Source§fn poll_http_ready(&mut self) -> Result<Async<()>, <T as Service>::Error>
fn poll_http_ready(&mut self) -> Result<Async<()>, <T as Service>::Error>
Returns
Ready when the service is able to process requests.Source§fn call_http(
&mut self,
request: Request<<T as HttpService>::RequestBody>,
) -> <T as HttpService>::Future
fn call_http( &mut self, request: Request<<T as HttpService>::RequestBody>, ) -> <T as HttpService>::Future
Process the request and return the response asynchronously.
Source§fn lift(self) -> LiftService<Self>where
Self: Sized,
fn lift(self) -> LiftService<Self>where
Self: Sized,
Wraps
self with LiftService. This provides an implementation of
Service for Self.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more