Enum malachite_base::unions::Union2
source · [−]pub enum Union2<A, B> {
A(A),
B(B),
}
Expand description
This is a union, or sum type, of $n$ values. It is essentially a generic enum.
Variants
A(A)
B(B)
Implementations
Trait Implementations
sourceimpl<A: FromStr, B: FromStr> FromStr for Union2<A, B>
impl<A: FromStr, B: FromStr> FromStr for Union2<A, B>
sourceimpl<A: Ord, B: Ord> Ord for Union2<A, B>
impl<A: Ord, B: Ord> Ord for Union2<A, B>
sourceimpl<A: PartialOrd, B: PartialOrd> PartialOrd<Union2<A, B>> for Union2<A, B>
impl<A: PartialOrd, B: PartialOrd> PartialOrd<Union2<A, B>> for Union2<A, B>
sourcefn partial_cmp(&self, other: &Union2<A, B>) -> Option<Ordering>
fn partial_cmp(&self, other: &Union2<A, B>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl<A: Copy, B: Copy> Copy for Union2<A, B>
impl<A: Eq, B: Eq> Eq for Union2<A, B>
impl<A, B> StructuralEq for Union2<A, B>
impl<A, B> StructuralPartialEq for Union2<A, B>
Auto Trait Implementations
impl<A, B> RefUnwindSafe for Union2<A, B> where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Union2<A, B> where
A: Send,
B: Send,
impl<A, B> Sync for Union2<A, B> where
A: Sync,
B: Sync,
impl<A, B> Unpin for Union2<A, B> where
A: Unpin,
B: Unpin,
impl<A, B> UnwindSafe for Union2<A, B> where
A: UnwindSafe,
B: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more