pub struct BodyStream<S, E> { /* private fields */ }
Expand description
Type represent streaming body.
Response does not contain content-length
header and appropriate transfer encoding is used.
Implementations§
Trait Implementations§
Source§impl<S, E> Debug for BodyStream<S, E>
impl<S, E> Debug for BodyStream<S, E>
Source§impl<S, E> From<BodyStream<S, E>> for Body
impl<S, E> From<BodyStream<S, E>> for Body
Source§fn from(s: BodyStream<S, E>) -> Body
fn from(s: BodyStream<S, E>) -> Body
Converts to this type from the input type.
Source§impl<S, E> MessageBody for BodyStream<S, E>
impl<S, E> MessageBody for BodyStream<S, E>
Source§fn poll_next_chunk(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Option<Result<Bytes, Rc<dyn Error>>>>
fn poll_next_chunk( &mut self, cx: &mut Context<'_>, ) -> Poll<Option<Result<Bytes, Rc<dyn Error>>>>
Attempts to pull out the next value of the underlying Stream
.
Empty values are skipped to prevent BodyStream
’s transmission being
ended on a zero-length chunk, but rather proceed until the underlying
Stream
ends.
Auto Trait Implementations§
impl<S, E> Freeze for BodyStream<S, E>where
S: Freeze,
impl<S, E> RefUnwindSafe for BodyStream<S, E>where
S: RefUnwindSafe,
E: RefUnwindSafe,
impl<S, E> Send for BodyStream<S, E>
impl<S, E> Sync for BodyStream<S, E>
impl<S, E> Unpin for BodyStream<S, E>
impl<S, E> UnwindSafe for BodyStream<S, E>where
S: UnwindSafe,
E: 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