pub struct SizedStream<S> { /* private fields */ }
Expand description
Type represent streaming body. This body implementation should be used if total size of stream is known. Data get sent as is without using transfer encoding.
Implementations§
Trait Implementations§
Source§impl<S> Debug for SizedStream<S>
impl<S> Debug for SizedStream<S>
Source§impl<S> From<SizedStream<S>> for Body
impl<S> From<SizedStream<S>> for Body
Source§fn from(s: SizedStream<S>) -> Body
fn from(s: SizedStream<S>) -> Body
Converts to this type from the input type.
Source§impl<S> MessageBody for SizedStream<S>
impl<S> MessageBody for SizedStream<S>
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 SizedStream
’s transmission being
ended on a zero-length chunk, but rather proceed until the underlying
Stream
ends.
Auto Trait Implementations§
impl<S> Freeze for SizedStream<S>where
S: Freeze,
impl<S> RefUnwindSafe for SizedStream<S>where
S: RefUnwindSafe,
impl<S> Send for SizedStream<S>where
S: Send,
impl<S> Sync for SizedStream<S>where
S: Sync,
impl<S> Unpin for SizedStream<S>where
S: Unpin,
impl<S> UnwindSafe for SizedStream<S>where
S: 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