Struct tower_http::compression::CompressionBody
source · [−]pub struct CompressionBody<B> where
B: Body, { /* private fields */ }
compression-br
or compression-deflate
or compression-gzip
only.Expand description
Response body of Compression
.
Implementations
sourceimpl<B> CompressionBody<B> where
B: Body,
impl<B> CompressionBody<B> where
B: Body,
sourcepub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut B>
pub fn get_pin_mut(self: Pin<&mut Self>) -> Pin<&mut B>
Get a pinned mutable reference to the inner body
sourcepub fn into_inner(self) -> B
pub fn into_inner(self) -> B
Consume self
, returning the inner body
Trait Implementations
sourceimpl<B> Body for CompressionBody<B> where
B: Body,
B::Error: Into<BoxError>,
impl<B> Body for CompressionBody<B> where
B: Body,
B::Error: Into<BoxError>,
sourcefn poll_data(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Self::Data, Self::Error>>>
fn poll_data(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Self::Data, Self::Error>>>
Attempt to pull out the next data buffer of this stream.
sourcefn poll_trailers(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<Option<HeaderMap>, Self::Error>>
fn poll_trailers(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Result<Option<HeaderMap>, Self::Error>>
Poll for an optional single HeaderMap
of trailers. Read more
sourcefn is_end_stream(&self) -> bool
fn is_end_stream(&self) -> bool
Returns true
when the end of stream has been reached. Read more
sourcefn size_hint(&self) -> SizeHint
fn size_hint(&self) -> SizeHint
Returns the bounds on the remaining length of the stream. Read more
sourcefn data(&mut self) -> Data<'_, Self> where
Self: Unpin,
fn data(&mut self) -> Data<'_, Self> where
Self: Unpin,
Returns future that resolves to next data chunk, if any.
sourcefn trailers(&mut self) -> Trailers<'_, Self> where
Self: Unpin,
fn trailers(&mut self) -> Trailers<'_, Self> where
Self: Unpin,
Returns future that resolves to trailers, if any.
sourcefn map_data<F, B>(self, f: F) -> MapData<Self, F> where
F: FnMut(Self::Data) -> B,
B: Buf,
fn map_data<F, B>(self, f: F) -> MapData<Self, F> where
F: FnMut(Self::Data) -> B,
B: Buf,
Maps this body’s data value to a different value.
sourcefn map_err<F, E>(self, f: F) -> MapErr<Self, F> where
F: FnMut(Self::Error) -> E,
fn map_err<F, E>(self, f: F) -> MapErr<Self, F> where
F: FnMut(Self::Error) -> E,
Maps this body’s error value to a different value.
sourcefn boxed(self) -> BoxBody<Self::Data, Self::Error> where
Self: 'static + Send + Sync,
fn boxed(self) -> BoxBody<Self::Data, Self::Error> where
Self: 'static + Send + Sync,
Turn this body into a boxed trait object.
sourcefn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error> where
Self: 'static + Send,
fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error> where
Self: 'static + Send,
Turn this body into a boxed trait object that is !Sync.
impl<'__pin, B> Unpin for CompressionBody<B> where
__Origin<'__pin, B>: Unpin,
B: Body,
Auto Trait Implementations
impl<B> RefUnwindSafe for CompressionBody<B> where
B: RefUnwindSafe,
<B as Body>::Data: RefUnwindSafe,
<B as Body>::Error: RefUnwindSafe,
impl<B> Send for CompressionBody<B> where
B: Send,
<B as Body>::Data: Send,
<B as Body>::Error: Send,
impl<B> Sync for CompressionBody<B> where
B: Sync,
<B as Body>::Data: Sync,
<B as Body>::Error: Sync,
impl<B> UnwindSafe for CompressionBody<B> where
B: UnwindSafe,
<B as Body>::Data: UnwindSafe,
<B as Body>::Error: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> PolicyExt for T where
T: ?Sized,
impl<T> PolicyExt for T where
T: ?Sized,
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more