Struct actix_http::body::BoxBody
source · pub struct BoxBody(_);
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 + 'static, Global>
type Error = Box<dyn Error + 'static, Global>
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