Struct tower_http::trace::ResponseBody[][src]

pub struct ResponseBody<B, C, OnBodyChunk, OnEos, OnFailure> { /* fields omitted */ }
This is supported on crate feature trace only.
Expand description

Response body for Trace.

Trait Implementations

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>, 
[src]

type Data = B::Data

Values yielded by the Body.

type Error = B::Error

The error type this Body might generate.

fn poll_data(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>
) -> Poll<Option<Result<Self::Data, Self::Error>>>
[src]

Attempt to pull out the next data buffer of this stream.

fn poll_trailers(
    self: Pin<&mut Self>,
    cx: &mut Context<'_>
) -> Poll<Result<Option<HeaderMap>, Self::Error>>
[src]

Poll for an optional single HeaderMap of trailers. Read more

fn is_end_stream(&self) -> bool[src]

Returns true when the end of stream has been reached. Read more

fn size_hint(&self) -> SizeHint[src]

Returns the bounds on the remaining length of the stream. Read more

fn data(&mut self) -> Data<'_, Self> where
    Self: Unpin
[src]

Returns future that resolves to next data chunk, if any.

fn trailers(&mut self) -> Trailers<'_, Self> where
    Self: Unpin
[src]

Returns future that resolves to trailers, if any.

fn map_data<F, B>(self, f: F) -> MapData<Self, F> where
    F: FnMut(Self::Data) -> B,
    B: Buf
[src]

Maps this body’s data value to a different value.

fn map_err<F, E>(self, f: F) -> MapErr<Self, F> where
    F: FnMut(Self::Error) -> E, 
[src]

Maps this body’s error value to a different value.

fn boxed(self) -> BoxBody<Self::Data, Self::Error> where
    Self: Send + Sync + 'static, 
[src]

Turn this body into a boxed trait object.

impl<'pin, B, C, OnBodyChunk, OnEos, OnFailure> Unpin for ResponseBody<B, C, OnBodyChunk, OnEos, OnFailure> where
    __ResponseBody<'pin, B, C, OnBodyChunk, OnEos, OnFailure>: Unpin
[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T> Instrument for T[src]

fn instrument(self, span: Span) -> Instrumented<Self>[src]

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

fn in_current_span(self) -> Instrumented<Self>[src]

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> PolicyExt for T where
    T: ?Sized
[src]

pub fn and<P, B, E>(Self, P) -> And<T, P> where
    T: Policy<B, E>,
    P: Policy<B, E>, 
[src]

This is supported on crate feature follow-redirect only.

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more

pub fn or<P, B, E>(Self, P) -> Or<T, P> where
    T: Policy<B, E>,
    P: Policy<B, E>, 
[src]

This is supported on crate feature follow-redirect only.

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.