pub enum Body {
Full(Box<[u8]>),
Stream(Pin<Box<dyn Stream<Item = Vec<u8>> + Send>>),
}
Variants§
Trait Implementations§
Source§impl Body for Body
impl Body for Body
Source§type Error = Infallible
type Error = Infallible
The error type this
Body
might generate.Source§fn size_hint(&self) -> SizeHint
fn size_hint(&self) -> SizeHint
Returns the bounds on the remaining length of the stream. Read more
Source§fn poll_frame(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Option<Result<Frame<Self::Data>, Self::Error>>>
fn poll_frame( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Result<Frame<Self::Data>, Self::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 moreAuto Trait Implementations§
impl Freeze for Body
impl !RefUnwindSafe for Body
impl Send for Body
impl !Sync for Body
impl Unpin for Body
impl !UnwindSafe for Body
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