pub struct BoxBody(/* private fields */);Expand description
type erased body. This is a !Send box, unlike http_body_util::UnsyncBoxBody.
Implementations§
Trait Implementations§
Source§impl Body for BoxBody
impl Body for BoxBody
Source§type Data = Bytes
type Data = Bytes
The payload data type yielded by
Frame::Data variants.Source§type Error = Box<dyn Error + Sync + Send>
type Error = Box<dyn Error + Sync + Send>
The error type that can occur while producing frames.
Source§fn poll_frame(
self: Pin<&mut BoxBody>,
cx: &mut Context<'_>,
) -> Poll<Option<Result<Frame<Bytes>, Box<dyn Error + Sync + Send>>>>
fn poll_frame( self: Pin<&mut BoxBody>, cx: &mut Context<'_>, ) -> Poll<Option<Result<Frame<Bytes>, Box<dyn Error + Sync + Send>>>>
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 From<BoxBody> for RequestBody
impl From<BoxBody> for RequestBody
Source§fn from(body: BoxBody) -> RequestBody
fn from(body: BoxBody) -> RequestBody
Converts to this type from the input type.
Source§impl From<BoxBody> for ResponseBody
impl From<BoxBody> for ResponseBody
Source§fn from(body: BoxBody) -> ResponseBody
fn from(body: BoxBody) -> ResponseBody
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for BoxBody
impl !RefUnwindSafe for BoxBody
impl !Send for BoxBody
impl !Sync for BoxBody
impl Unpin for BoxBody
impl UnsafeUnpin for BoxBody
impl !UnwindSafe for BoxBody
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