pub enum Either<A, B> {
Left(A),
Right(B),
}Expand description
Combines two different futures, streams, or sinks having the same associated types into a single type.
Variants§
Trait Implementations§
Source§impl<A, B> Ord for Either<A, B>
impl<A, B> Ord for Either<A, B>
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<A, B> PartialOrd for Either<A, B>where
A: PartialOrd,
B: PartialOrd,
impl<A, B> PartialOrd for Either<A, B>where
A: PartialOrd,
B: PartialOrd,
impl<A, B> Copy for Either<A, B>
impl<A, B> Eq for Either<A, B>
impl<A, B> StructuralPartialEq for Either<A, B>
Auto Trait Implementations§
impl<A, B> Freeze for Either<A, B>
impl<A, B> RefUnwindSafe for Either<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Either<A, B>
impl<A, B> Sync for Either<A, B>
impl<A, B> Unpin for Either<A, B>
impl<A, B> UnsafeUnpin for Either<A, B>where
A: UnsafeUnpin,
B: UnsafeUnpin,
impl<A, B> UnwindSafe for Either<A, B>where
A: UnwindSafe,
B: 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