Struct BodyDataStream

#[must_use]
pub struct BodyDataStream { /* private fields */ }

A stream of data frames.

Created with Body::into_data_stream.

Trait Implementations

impl Body for BodyDataStream

type Data = Bytes;
type Error = Error;
fn poll_frame(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>
fn is_end_stream(&self) -> bool
fn size_hint(&self) -> SizeHint

impl Debug for BodyDataStream

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

impl Stream for BodyDataStream

type Item = Result<Bytes, Error>;
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>
fn size_hint(&self) -> (usize, Option<usize>)

Auto Trait Implementations

impl !RefUnwindSafe for BodyDataStream

impl !Sync for BodyDataStream

impl !UnwindSafe for BodyDataStream

impl Freeze for BodyDataStream

impl Send for BodyDataStream

impl Unpin for BodyDataStream

impl UnsafeUnpin for BodyDataStream

Blanket Implementations

impl<S, T, E> TryStream for BodyDataStream where S: Stream<Item = Result<T, E>> + ?Sized,

type Ok = T;
type Error = E;
fn try_poll_next(self: Pin<&mut S>, cx: &mut Context<'_>) -> Poll<Option<Result<<S as TryStream>::Ok, <S as TryStream>::Error>>>

impl<T> Any for BodyDataStream where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

impl<T> BodyExt for BodyDataStream where T: Body + ?Sized,

impl<T> Borrow<T> for BodyDataStream where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for BodyDataStream where T: ?Sized,

fn borrow_mut(&mut self) -> &mut T

impl<T> From<T> for BodyDataStream

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Instrument for BodyDataStream

impl<T> WithSubscriber for BodyDataStream

impl<T, U> Into<U> for BodyDataStream where U: From<T>,

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom<U> for BodyDataStream where U: Into<T>,

type Error = never;
fn try_from(value: U) -> Result<T, never>

impl<T, U> TryInto<U> for BodyDataStream where U: TryFrom<T>,

type Error = <U as TryFrom<T>>::Error;
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>