Struct product_os_http_body_util::BodyStream
source · pub struct BodyStream<B> { /* private fields */ }
Expand description
A stream created from a Body
.
Implementations§
source§impl<B> BodyStream<B>
impl<B> BodyStream<B>
sourcepub fn new(body: B) -> BodyStream<B>
pub fn new(body: B) -> BodyStream<B>
Create a new BodyStream
.
Trait Implementations§
source§impl<B> Body for BodyStream<B>where
B: Body,
impl<B> Body for BodyStream<B>where
B: Body,
source§fn poll_frame(
self: Pin<&mut BodyStream<B>>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Frame<<BodyStream<B> as Body>::Data>, <BodyStream<B> as Body>::Error>>>
fn poll_frame( self: Pin<&mut BodyStream<B>>, cx: &mut Context<'_> ) -> Poll<Option<Result<Frame<<BodyStream<B> as Body>::Data>, <BodyStream<B> as Body>::Error>>>
Attempt to pull out the next data buffer of this stream.
source§fn is_end_stream(&self) -> bool
fn is_end_stream(&self) -> bool
Returns
true
when the end of stream has been reached. Read moresource§impl<B> Clone for BodyStream<B>where
B: Clone,
impl<B> Clone for BodyStream<B>where
B: Clone,
source§fn clone(&self) -> BodyStream<B>
fn clone(&self) -> BodyStream<B>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<B> Debug for BodyStream<B>where
B: Debug,
impl<B> Debug for BodyStream<B>where
B: Debug,
source§impl<B> Stream for BodyStream<B>where
B: Body,
impl<B> Stream for BodyStream<B>where
B: Body,
source§fn poll_next(
self: Pin<&mut BodyStream<B>>,
cx: &mut Context<'_>
) -> Poll<Option<<BodyStream<B> as Stream>::Item>>
fn poll_next( self: Pin<&mut BodyStream<B>>, cx: &mut Context<'_> ) -> Poll<Option<<BodyStream<B> as Stream>::Item>>
Attempt to pull out the next value of this stream, registering the
current task for wakeup if the value is not yet available, and returning
None
if the stream is exhausted. Read moreimpl<B> Copy for BodyStream<B>where
B: Copy,
impl<'__pin, B> Unpin for BodyStream<B>where
__Origin<'__pin, B>: Unpin,
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> UnwindSafe for BodyStream<B>where
B: UnwindSafe,
Blanket Implementations§
source§impl<T> BodyExt for T
impl<T> BodyExt for T
source§fn frame(&mut self) -> Frame<'_, Self> ⓘwhere
Self: Unpin,
fn frame(&mut self) -> Frame<'_, Self> ⓘwhere
Self: Unpin,
Returns a future that resolves to the next
Frame
, if any.source§fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
fn map_frame<F, B>(self, f: F) -> MapFrame<Self, F>
Maps this body’s frame to a different kind.
source§fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
fn map_err<F, E>(self, f: F) -> MapErr<Self, F>
Maps this body’s error value to a different value.
source§fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
fn boxed_unsync(self) -> UnsyncBoxBody<Self::Data, Self::Error>
Turn this body into a boxed trait object that is !Sync.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more