Enum Either
enum Either<L, R>
Sum type with two cases: Left and Right, used if a body can be one of
two distinct types.
Variants
-
Left(L) A value of type
L-
Right(R) A value of type
R
Implementations
impl<L> Either<L, L>
fn into_inner(self: Self) -> LConvert
Eitherinto the inner type, if bothLeftandRightare of the same type.
impl<'__pin, L, R> Unpin for Either<L, R>
impl<L, R> Freeze for Either<L, R>
impl<L, R> RefUnwindSafe for Either<L, R>
impl<L, R> Send for Either<L, R>
impl<L, R> Sync for Either<L, R>
impl<L, R> UnsafeUnpin for Either<L, R>
impl<L, R> UnwindSafe for Either<L, R>
impl<L, R, Data> Body for Either<L, R>
fn poll_frame(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Result<Frame<<Self as >::Data>, <Self as >::Error>>>fn is_end_stream(self: &Self) -> boolfn size_hint(self: &Self) -> SizeHint
impl<L: $crate::clone::Clone, R: $crate::clone::Clone> Clone for Either<L, R>
fn clone(self: &Self) -> Either<L, R>
impl<L: $crate::fmt::Debug, R: $crate::fmt::Debug> Debug for Either<L, R>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<L: $crate::marker::Copy, R: $crate::marker::Copy> Copy for Either<L, R>
impl<T> Any for Either<L, R>
fn type_id(self: &Self) -> TypeId
impl<T> BodyExt for Either<L, R>
impl<T> Borrow for Either<L, R>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Either<L, R>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Either<L, R>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Either<L, R>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Either<L, R>
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for Either<L, R>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Either<L, R>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Either<L, R>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>