Struct BodyStream

pub struct BodyStream<B> { /* private fields */ }

A stream created from a Body.

Implementations

impl<B> BodyStream<B>

fn new(body: B) -> Self

Create a new BodyStream.

Trait Implementations

impl<'__pin, B> Unpin for BodyStream<B> where PinnedFieldsOf<__Origin<'__pin, B>>: Unpin,

impl<B> Body for BodyStream<B> where B: Body,

type Data = <B as Body>::Data;
type Error = <B as Body>::Error;
fn poll_frame(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>

impl<B> Stream for BodyStream<B> where B: Body,

type Item = Result<Frame<<B as Body>::Data>, <B as Body>::Error>;
fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>

impl<B: Clone> Clone for BodyStream<B>

fn clone(&self) -> BodyStream<B>

impl<B: Copy> Copy for BodyStream<B>

impl<B: Debug> Debug for BodyStream<B>

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

Auto Trait Implementations

impl<B> Freeze for BodyStream<B> where B: Freeze,

impl<B> RefUnwindSafe for BodyStream<B> where B: RefUnwindSafe,

impl<B> Send for BodyStream<B> where B: Send,

impl<B> Sync for BodyStream<B> where B: Sync,

impl<B> UnsafeUnpin for BodyStream<B> where B: UnsafeUnpin,

impl<B> UnwindSafe for BodyStream<B> where B: UnwindSafe,

Blanket Implementations

impl<S, T, E> TryStream for BodyStream<B> 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 BodyStream<B> where T: 'static + ?Sized,

fn type_id(&self) -> TypeId

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

impl<T> Borrow<T> for BodyStream<B> where T: ?Sized,

fn borrow(&self) -> &T

impl<T> BorrowMut<T> for BodyStream<B> where T: ?Sized,

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

impl<T> CloneToUninit for BodyStream<B> where T: Clone,

unsafe fn clone_to_uninit(&self, dest: *mut u8)

impl<T> From<T> for BodyStream<B>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToOwned for BodyStream<B> where T: Clone,

type Owned = T;
fn to_owned(&self) -> T
fn clone_into(&self, target: &mut T)

impl<T, U> Into<U> for BodyStream<B> 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 BodyStream<B> where U: Into<T>,

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

impl<T, U> TryInto<U> for BodyStream<B> where U: TryFrom<T>,

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