Struct actix_http::body::BoxBody
source · pub struct BoxBody(/* private fields */);
Expand description
A boxed message body with boxed errors.
Implementations§
source§impl BoxBody
impl BoxBody
sourcepub fn new<B>(body: B) -> Selfwhere
B: MessageBody + 'static,
pub fn new<B>(body: B) -> Selfwhere
B: MessageBody + 'static,
Boxes body type, erasing type information.
If the body type to wrap is unknown or generic it is better to use MessageBody::boxed
to
avoid double boxing.
sourcepub fn as_pin_mut(&mut self) -> Pin<&mut Self>
pub fn as_pin_mut(&mut self) -> Pin<&mut Self>
Returns a mutable pinned reference to the inner message body type.
Trait Implementations§
source§impl MessageBody for BoxBody
impl MessageBody for BoxBody
§type Error = Box<dyn Error>
type Error = Box<dyn Error>
The type of error that will be returned if streaming body fails. Read more
source§fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Option<Result<Bytes, Self::Error>>>
fn poll_next( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Option<Result<Bytes, Self::Error>>>
Attempt to pull out the next chunk of body bytes. Read more
Auto Trait Implementations§
impl !Freeze for BoxBody
impl !RefUnwindSafe for BoxBody
impl !Send for BoxBody
impl !Sync for BoxBody
impl Unpin 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