pub enum Either<T, U> {
Left(T),
Right(U),
}
Expand description
Used to lift iterator generators into a sum type.
This is used in partial application,
e.g. And::papp(true)
returns Either::Left(Idb)
.
Variants§
Implementations§
Trait Implementations§
Source§impl<T1, T2, U1, U2, V1, V2, I1, I2> HigherIntoIterator<Either<(U1, U2), Empty>> for (T1, T2)where
T1: HigherIntoIterator<Item<U1>, Item = V1, IntoIter = I1>,
T2: Clone + HigherIntoIterator<Item<U2>, Item = V2, IntoIter = I2>,
I1: Iterator<Item = V1>,
U2: Clone,
impl<T1, T2, U1, U2, V1, V2, I1, I2> HigherIntoIterator<Either<(U1, U2), Empty>> for (T1, T2)where
T1: HigherIntoIterator<Item<U1>, Item = V1, IntoIter = I1>,
T2: Clone + HigherIntoIterator<Item<U2>, Item = V2, IntoIter = I2>,
I1: Iterator<Item = V1>,
U2: Clone,
Source§impl<T, U, V, W, I1, I2> HigherIntoIterator<Either<V, Empty>> for Either<T, U>where
T: HigherIntoIterator<Item<V>, Item = W, IntoIter = I1>,
U: HigherIntoIterator<Item<V>, Item = W, IntoIter = I2>,
I1: Iterator<Item = W>,
I2: Iterator<Item = W>,
impl<T, U, V, W, I1, I2> HigherIntoIterator<Either<V, Empty>> for Either<T, U>where
T: HigherIntoIterator<Item<V>, Item = W, IntoIter = I1>,
U: HigherIntoIterator<Item<V>, Item = W, IntoIter = I2>,
I1: Iterator<Item = W>,
I2: Iterator<Item = W>,
Auto Trait Implementations§
impl<T, U> Freeze for Either<T, U>
impl<T, U> RefUnwindSafe for Either<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for Either<T, U>
impl<T, U> Sync for Either<T, U>
impl<T, U> Unpin for Either<T, U>
impl<T, U> UnwindSafe for Either<T, U>where
T: UnwindSafe,
U: 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