pub struct StreamBody<T> { /* private fields */ }Expand description
Implementations§
Source§impl<T> StreamBody<T>
impl<T> StreamBody<T>
pub fn new(value: T) -> StreamBody<T>
Trait Implementations§
Source§impl<S, D, E> Body for StreamBody<S>
impl<S, D, E> Body for StreamBody<S>
Source§type Data = D
type Data = D
The payload data type yielded by
Frame::Data variants.Source§fn poll_frame(
self: Pin<&mut StreamBody<S>>,
cx: &mut Context<'_>,
) -> Poll<Option<Result<Frame<<StreamBody<S> as Body>::Data>, <StreamBody<S> as Body>::Error>>>
fn poll_frame( self: Pin<&mut StreamBody<S>>, cx: &mut Context<'_>, ) -> Poll<Option<Result<Frame<<StreamBody<S> as Body>::Data>, <StreamBody<S> as Body>::Error>>>
Attempt to pull the next frame from the body. Read more
Source§fn is_end_stream(&self) -> bool
fn is_end_stream(&self) -> bool
Indicates whether the body has been fully consumed. Read more
Source§impl<T> Debug for StreamBody<T>where
T: Debug,
impl<T> Debug for StreamBody<T>where
T: Debug,
Source§impl<B> Stream for StreamBody<B>where
B: Body,
impl<B> Stream for StreamBody<B>where
B: Body,
Source§type Item = Result<Frame<<B as Body>::Data>, <B as Body>::Error>
type Item = Result<Frame<<B as Body>::Data>, <B as Body>::Error>
Values yielded by the stream.
Source§fn poll_next(
self: Pin<&mut StreamBody<B>>,
cx: &mut Context<'_>,
) -> Poll<Option<<StreamBody<B> as Stream>::Item>>
fn poll_next( self: Pin<&mut StreamBody<B>>, cx: &mut Context<'_>, ) -> Poll<Option<<StreamBody<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<'__pin, T> Unpin for StreamBody<T>where
<PinnedFieldsOfHelperStruct<__Origin<'__pin, T>> as PinnedFieldsOfHelperTrait>::Actual: Unpin,
Auto Trait Implementations§
impl<T> Freeze for StreamBody<T>where
T: Freeze,
impl<T> RefUnwindSafe for StreamBody<T>where
T: RefUnwindSafe,
impl<T> Send for StreamBody<T>where
T: Send,
impl<T> Sync for StreamBody<T>where
T: Sync,
impl<T> UnsafeUnpin for StreamBody<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for StreamBody<T>where
T: UnwindSafe,
Blanket Implementations§
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