Struct tower_http::trace::ResponseBody
source · [−]pub struct ResponseBody<B, C, OnBodyChunk, OnEos, OnFailure> { /* private fields */ }
trace
only.Expand description
Response body for Trace
.
Trait Implementations
sourceimpl<B, C, OnBodyChunkT, OnEosT, OnFailureT> Body for ResponseBody<B, C, OnBodyChunkT, OnEosT, OnFailureT> where
B: Body,
B::Error: Display + 'static,
C: ClassifyEos,
OnEosT: OnEos,
OnBodyChunkT: OnBodyChunk<B::Data>,
OnFailureT: OnFailure<C::FailureClass>,
impl<B, C, OnBodyChunkT, OnEosT, OnFailureT> Body for ResponseBody<B, C, OnBodyChunkT, OnEosT, OnFailureT> where
B: Body,
B::Error: Display + 'static,
C: ClassifyEos,
OnEosT: OnEos,
OnBodyChunkT: OnBodyChunk<B::Data>,
OnFailureT: OnFailure<C::FailureClass>,
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, C, OnBodyChunk, OnEos, OnFailure> Unpin for ResponseBody<B, C, OnBodyChunk, OnEos, OnFailure> where
__Origin<'__pin, B, C, OnBodyChunk, OnEos, OnFailure>: Unpin,
Auto Trait Implementations
impl<B, C, OnBodyChunk, OnEos, OnFailure> !RefUnwindSafe for ResponseBody<B, C, OnBodyChunk, OnEos, OnFailure>
impl<B, C, OnBodyChunk, OnEos, OnFailure> Send for ResponseBody<B, C, OnBodyChunk, OnEos, OnFailure> where
B: Send,
C: Send,
OnBodyChunk: Send,
OnEos: Send,
OnFailure: Send,
impl<B, C, OnBodyChunk, OnEos, OnFailure> Sync for ResponseBody<B, C, OnBodyChunk, OnEos, OnFailure> where
B: Sync,
C: Sync,
OnBodyChunk: Sync,
OnEos: Sync,
OnFailure: Sync,
impl<B, C, OnBodyChunk, OnEos, OnFailure> !UnwindSafe for ResponseBody<B, C, OnBodyChunk, OnEos, OnFailure>
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