pub enum EitherOrBoth<L, R> {
Both(L, R),
Left(L),
Right(R),
}Expand description
A simple enum that represents either a left or right value.
Variants§
Trait Implementations§
Source§impl<L: Clone, R: Clone> Clone for EitherOrBoth<L, R>
impl<L: Clone, R: Clone> Clone for EitherOrBoth<L, R>
Source§fn clone(&self) -> EitherOrBoth<L, R>
fn clone(&self) -> EitherOrBoth<L, R>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<L, R, C> From<Pair<L, R, C>> for EitherOrBoth<L, R>
impl<L, R, C> From<Pair<L, R, C>> for EitherOrBoth<L, R>
impl<L: Eq, R: Eq> Eq for EitherOrBoth<L, R>
impl<L, R> StructuralPartialEq for EitherOrBoth<L, R>
Auto Trait Implementations§
impl<L, R> Freeze for EitherOrBoth<L, R>
impl<L, R> RefUnwindSafe for EitherOrBoth<L, R>where
L: RefUnwindSafe,
R: RefUnwindSafe,
impl<L, R> Send for EitherOrBoth<L, R>
impl<L, R> Sync for EitherOrBoth<L, R>
impl<L, R> Unpin for EitherOrBoth<L, R>
impl<L, R> UnwindSafe for EitherOrBoth<L, R>where
L: UnwindSafe,
R: 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