Enum actix_web::body::EitherBody
source · [−]pub enum EitherBody<L, R = BoxBody> {
Left {
body: L,
},
Right {
body: R,
},
}
Variants
Left
A body of type L
.
Right
A body of type R
.
Implementations
sourceimpl<L> EitherBody<L, BoxBody>
impl<L> EitherBody<L, BoxBody>
sourcepub fn new(body: L) -> EitherBody<L, BoxBody>
pub fn new(body: L) -> EitherBody<L, BoxBody>
Creates new EitherBody
using left variant and boxed right variant.
sourceimpl<L, R> EitherBody<L, R>
impl<L, R> EitherBody<L, R>
sourcepub fn left(body: L) -> EitherBody<L, R>
pub fn left(body: L) -> EitherBody<L, R>
Creates new EitherBody
using left variant.
sourcepub fn right(body: R) -> EitherBody<L, R>
pub fn right(body: R) -> EitherBody<L, R>
Creates new EitherBody
using right variant.
Trait Implementations
sourceimpl<L, R> Clone for EitherBody<L, R> where
L: Clone,
R: Clone,
impl<L, R> Clone for EitherBody<L, R> where
L: Clone,
R: Clone,
sourcefn clone(&self) -> EitherBody<L, R>
fn clone(&self) -> EitherBody<L, R>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<L, R> Debug for EitherBody<L, R> where
L: Debug,
R: Debug,
impl<L, R> Debug for EitherBody<L, R> where
L: Debug,
R: Debug,
sourceimpl<L, R> MessageBody for EitherBody<L, R> where
L: 'static + MessageBody,
R: 'static + MessageBody,
impl<L, R> MessageBody for EitherBody<L, R> where
L: 'static + MessageBody,
R: 'static + MessageBody,
sourcefn poll_next(
self: Pin<&mut EitherBody<L, R>>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, <EitherBody<L, R> as MessageBody>::Error>>>
fn poll_next(
self: Pin<&mut EitherBody<L, R>>,
cx: &mut Context<'_>
) -> Poll<Option<Result<Bytes, <EitherBody<L, R> as MessageBody>::Error>>>
Attempt to pull out the next chunk of body bytes.
sourcefn try_into_bytes(self) -> Result<Bytes, EitherBody<L, R>>
fn try_into_bytes(self) -> Result<Bytes, EitherBody<L, R>>
Try to convert into the complete chunk of body bytes. Read more
impl<'__pin, L, R> Unpin for EitherBody<L, R> where
__Origin<'__pin, L, R>: Unpin,
Auto Trait Implementations
impl<L, R> RefUnwindSafe for EitherBody<L, R> where
L: RefUnwindSafe,
R: RefUnwindSafe,
impl<L, R> Send for EitherBody<L, R> where
L: Send,
R: Send,
impl<L, R> Sync for EitherBody<L, R> where
L: Sync,
R: Sync,
impl<L, R> UnwindSafe for EitherBody<L, R> where
L: UnwindSafe,
R: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
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