pub enum Either<A, B, C = Invalid, D = Invalid> {
First(A),
Second(B),
Third(C),
Fourth(D),
}
Expand description
Parse an item in a given list. If multiple types can be parsed, the first one is chosen.
Variants§
Implementations§
Trait Implementations§
Source§impl<A: Ord, B: Ord, C: Ord, D: Ord> Ord for Either<A, B, C, D>
impl<A: Ord, B: Ord, C: Ord, D: Ord> Ord for Either<A, B, C, D>
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: ParseMore, B: ParseMore, C: ParseMore, D: ParseMore> ParseMore for Either<A, B, C, D>
impl<A: ParseMore, B: ParseMore, C: ParseMore, D: ParseMore> ParseMore for Either<A, B, C, D>
fn parse(input: ParseStream<'_>) -> Result<Self>
Source§impl<A: PartialEq, B: PartialEq, C: PartialEq, D: PartialEq> PartialEq for Either<A, B, C, D>
impl<A: PartialEq, B: PartialEq, C: PartialEq, D: PartialEq> PartialEq for Either<A, B, C, D>
Source§impl<A: PartialOrd, B: PartialOrd, C: PartialOrd, D: PartialOrd> PartialOrd for Either<A, B, C, D>
impl<A: PartialOrd, B: PartialOrd, C: PartialOrd, D: PartialOrd> PartialOrd for Either<A, B, C, D>
impl<A: Copy, B: Copy, C: Copy, D: Copy> Copy for Either<A, B, C, D>
impl<A: Eq, B: Eq, C: Eq, D: Eq> Eq for Either<A, B, C, D>
impl<A, B, C, D> StructuralPartialEq for Either<A, B, C, D>
Auto Trait Implementations§
impl<A, B, C, D> Freeze for Either<A, B, C, D>
impl<A, B, C, D> RefUnwindSafe for Either<A, B, C, D>
impl<A, B, C, D> Send for Either<A, B, C, D>
impl<A, B, C, D> Sync for Either<A, B, C, D>
impl<A, B, C, D> Unpin for Either<A, B, C, D>
impl<A, B, C, D> UnwindSafe for Either<A, B, C, D>
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