pub enum EitherOrBoth<L, R> {
Both(L, R),
Left(L),
Right(R),
}Expand description
Enum for zip_longest’s item type.
Variants§
Both(L, R)
Both items are available.
Left(L)
Item from the left stream after right stream ended.
Right(R)
Item from the right stream after left stream ended.
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: Ord, R: Ord> Ord for EitherOrBoth<L, R>
impl<L: Ord, R: Ord> Ord for EitherOrBoth<L, R>
Source§fn cmp(&self, other: &EitherOrBoth<L, R>) -> Ordering
fn cmp(&self, other: &EitherOrBoth<L, R>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<L: PartialOrd, R: PartialOrd> PartialOrd for EitherOrBoth<L, R>
impl<L: PartialOrd, R: PartialOrd> PartialOrd for EitherOrBoth<L, R>
impl<L: Copy, R: Copy> Copy 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> UnsafeUnpin for EitherOrBoth<L, R>where
L: UnsafeUnpin,
R: UnsafeUnpin,
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