pub enum Either<T, U> {
Left(T),
Right(U),
}Expand description
Sum type of left and right case.
Variants
Left(T)
Left case.
Right(U)
Right case.
Trait Implementations
impl<T: Copy, U: Copy> Copy for Either<T, U>
impl<A, B, C> PowImply<Either<fn(A) -> C, fn(B) -> C>, fn((A, B)) -> C> for Pow<Pow<C, And<A, B>>, Or<Pow<C, A>, Pow<C, B>>>
impl<A, B, C> PowImply<Either<fn(C) -> A, fn(C) -> B>, fn(C) -> Either<A, B>> for Pow<Pow<Or<A, B>, C>, Or<Pow<A, C>, Pow<B, C>>>
impl<A, B, C> PowImply<fn((A, B)) -> C, Either<fn(A) -> C, fn(B) -> C>> for Pow<Or<Pow<C, A>, Pow<C, B>>, Pow<C, And<A, B>>>
impl<A, B, C> PowImply<fn(C) -> Either<A, B>, Either<fn(C) -> A, fn(C) -> B>> for Pow<Or<Pow<A, C>, Pow<B, C>>, Pow<Or<A, B>, C>>
Auto Trait Implementations
impl<T, U> RefUnwindSafe for Either<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for Either<T, U>where
T: Send,
U: Send,
impl<T, U> Sync for Either<T, U>where
T: Sync,
U: Sync,
impl<T, U> Unpin for Either<T, U>where
T: Unpin,
U: Unpin,
impl<T, U> UnwindSafe for Either<T, U>where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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