pub enum Either<Left, Right> {
    Left(Left),
    Right(Right),
}Expand description
A simple binary sum type.
This is occasionally useful in an ad hoc fashion.
Variants§
Trait Implementations§
impl<Left: Eq, Right: Eq> Eq for Either<Left, Right>
impl<Left, Right> StructuralPartialEq for Either<Left, Right>
Auto Trait Implementations§
impl<Left, Right> Freeze for Either<Left, Right>
impl<Left, Right> RefUnwindSafe for Either<Left, Right>where
    Left: RefUnwindSafe,
    Right: RefUnwindSafe,
impl<Left, Right> Send for Either<Left, Right>
impl<Left, Right> Sync for Either<Left, Right>
impl<Left, Right> Unpin for Either<Left, Right>
impl<Left, Right> UnwindSafe for Either<Left, Right>where
    Left: UnwindSafe,
    Right: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
 
impl<T> BorrowMut<T> for Twhere
    T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more