pub enum Either<L, R> {
Left(L),
Right(R),
}
Expand description
A sum type that always holds either a value of type L
or R
.
Variants
Left(L)
Constructs an instance of Either
containing a value of type L
.
Right(R)
Constructs an instance of Either
containing a value of type R
.
Auto Trait Implementations
impl<L, R> RefUnwindSafe for Either<L, R>where
L: RefUnwindSafe,
R: RefUnwindSafe,
impl<L, R> Send for Either<L, R>where
L: Send,
R: Send,
impl<L, R> Sync for Either<L, R>where
L: Sync,
R: Sync,
impl<L, R> Unpin for Either<L, R>where
L: Unpin,
R: Unpin,
impl<L, R> UnwindSafe for Either<L, R>where
L: UnwindSafe,
R: 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