Struct actix_http::body::BoxBody
source · [−]pub struct BoxBody(_);Expand description
A boxed message body with boxed errors.
Implementations
sourceimpl BoxBody
impl BoxBody
sourcepub fn new<B>(body: B) -> Self where
B: MessageBody + 'static,
pub fn new<B>(body: B) -> Self where
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
sourceimpl MessageBody for BoxBody
impl MessageBody for BoxBody
type Error = Box<dyn StdError>
type Error = Box<dyn StdError>
The type of error that will be returned if streaming body fails. Read more
sourcefn 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
sourcefn try_into_bytes(self) -> Result<Bytes, Self>
fn try_into_bytes(self) -> Result<Bytes, Self>
Try to convert into the complete chunk of body bytes. Read more
Auto Trait Implementations
impl !RefUnwindSafe for BoxBody
impl !Send for BoxBody
impl !Sync for BoxBody
impl Unpin for BoxBody
impl !UnwindSafe for BoxBody
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
