[][src]Enum sum::Sum2

pub enum Sum2<A, B> {
    A(A),
    B(B),
}

Variants

A(A)
B(B)

Implementations

impl<A, B> Sum2<A, B>[src]

pub fn is_a(&self) -> bool[src]

pub fn a(self) -> Option<A>[src]

pub fn is_b(&self) -> bool[src]

pub fn b(self) -> Option<B>[src]

pub fn as_ref(&self) -> Sum2<&A, &B>[src]

pub fn as_mut(&mut self) -> Sum2<&mut A, &mut B>[src]

pub fn as_pin_ref<'a>(self: Pin<&'a Self>) -> Sum2<Pin<&'a A>, Pin<&'a B>>[src]

pub fn as_pin_mut<'a>(
    self: Pin<&'a mut Self>
) -> Sum2<Pin<&'a mut A>, Pin<&'a mut B>>
[src]

impl<A> Sum2<A, A>[src]

pub fn into_inner(self) -> A[src]

Trait Implementations

impl<A, B, Target> AsMut<Target> for Sum2<A, B> where
    A: AsMut<Target>,
    B: AsMut<Target>, 
[src]

impl<A, B, Target> AsRef<Target> for Sum2<A, B> where
    A: AsRef<Target>,
    B: AsRef<Target>, 
[src]

impl<A: Clone, B: Clone> Clone for Sum2<A, B>[src]

impl<A: Copy, B: Copy> Copy for Sum2<A, B>[src]

impl<A: Debug, B: Debug> Debug for Sum2<A, B>[src]

impl<A, B> Deref for Sum2<A, B> where
    A: Deref,
    B: Deref<Target = A::Target>, 
[src]

type Target = A::Target

The resulting type after dereferencing.

impl<A, B> DerefMut for Sum2<A, B> where
    A: DerefMut,
    B: DerefMut<Target = A::Target>, 
[src]

impl<'de, A, B> Deserialize<'de> for Sum2<A, B> where
    A: Deserialize<'de>,
    B: Deserialize<'de>, 
[src]

impl<A, B> Display for Sum2<A, B> where
    A: Display,
    B: Display
[src]

impl<A, B> DoubleEndedIterator for Sum2<A, B> where
    A: DoubleEndedIterator,
    B: DoubleEndedIterator<Item = A::Item>, 
[src]

impl<A: Eq, B: Eq> Eq for Sum2<A, B>[src]

impl<A, B> Error for Sum2<A, B> where
    A: Error,
    B: Error
[src]

impl<A, B> ExactSizeIterator for Sum2<A, B> where
    A: ExactSizeIterator,
    B: ExactSizeIterator<Item = A::Item>, 
[src]

impl<A: Hash, B: Hash> Hash for Sum2<A, B>[src]

impl<A, B> Iterator for Sum2<A, B> where
    A: Iterator,
    B: Iterator<Item = A::Item>, 
[src]

type Item = A::Item

The type of the elements being iterated over.

impl<A: Ord, B: Ord> Ord for Sum2<A, B>[src]

impl<A: PartialEq, B: PartialEq> PartialEq<Sum2<A, B>> for Sum2<A, B>[src]

impl<A: PartialOrd, B: PartialOrd> PartialOrd<Sum2<A, B>> for Sum2<A, B>[src]

impl<A, B> Serialize for Sum2<A, B> where
    A: Serialize,
    B: Serialize
[src]

impl<A, B> StructuralEq for Sum2<A, B>[src]

impl<A, B> StructuralPartialEq for Sum2<A, B>[src]

Auto Trait Implementations

impl<A, B> RefUnwindSafe for Sum2<A, B> where
    A: RefUnwindSafe,
    B: RefUnwindSafe

impl<A, B> Send for Sum2<A, B> where
    A: Send,
    B: Send

impl<A, B> Sync for Sum2<A, B> where
    A: Sync,
    B: Sync

impl<A, B> Unpin for Sum2<A, B> where
    A: Unpin,
    B: Unpin

impl<A, B> UnwindSafe for Sum2<A, B> where
    A: UnwindSafe,
    B: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.