Struct fire_http_representation::bytes_stream::StreamHttpBody[][src]

pub struct StreamHttpBody<S> { /* fields omitted */ }
Expand description

A wrapper around BytesStream implementing http_body::Body.

Trait Implementations

impl<S: BytesStream> Body for StreamHttpBody<S>[src]

type Data = Bytes

Values yielded by the Body.

type Error = Error

The error type this Body might generate.

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

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

fn poll_trailers(
    self: Pin<&mut Self>,
    _: &mut Context<'_>
) -> Poll<Result<Option<HeaderMap>>>
[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
    B: Buf,
    F: FnMut(Self::Data) -> B, 
[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<S: Debug> Debug for StreamHttpBody<S>[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl<'__pin, S> Unpin for StreamHttpBody<S> where
    __Origin<'__pin, S>: Unpin
[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for StreamHttpBody<S> where
    S: RefUnwindSafe

impl<S> Send for StreamHttpBody<S> where
    S: Send

impl<S> Sync for StreamHttpBody<S> where
    S: Sync

impl<S> UnwindSafe for StreamHttpBody<S> where
    S: UnwindSafe

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, U> Into<U> for T where
    U: From<T>, 
[src]

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

Performs the conversion.

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.