[][src]Enum iter_set::Inclusion

pub enum Inclusion<T> {
    Left(T),
    Both(T, T),
    Right(T),
}

The sets an element is included in.

Variants

Left(T)
Both(T, T)
Right(T)

Implementations

impl<T> Inclusion<T>[src]

pub fn union(self) -> T[src]

Return the element, whichever set it is in. If it is in both sets, the left element is returned.

pub fn intersection(self) -> Option<T>[src]

Return the element if it is in both sets. The left element is returned.

pub fn difference(self) -> Option<T>[src]

Return the element if it is in the left set.

pub fn symmetric_difference(self) -> Option<T>[src]

Return the element if it is in exactly one set.

pub fn ordering(&self) -> Ordering[src]

Return an Ordering based on where the element is from.

  • Ordering::Less: from the right set.
  • Ordering::Equal: from both sets
  • Ordering::Greater: from the left set.

Trait Implementations

impl<T: Clone> Clone for Inclusion<T>[src]

impl<T: Copy> Copy for Inclusion<T>[src]

impl<T: Debug> Debug for Inclusion<T>[src]

impl<T: Eq> Eq for Inclusion<T>[src]

impl<T: PartialEq> PartialEq<Inclusion<T>> for Inclusion<T>[src]

impl<T> StructuralEq for Inclusion<T>[src]

impl<T> StructuralPartialEq for Inclusion<T>[src]

Auto Trait Implementations

impl<T> Send for Inclusion<T> where
    T: Send

impl<T> Sync for Inclusion<T> where
    T: Sync

impl<T> Unpin for Inclusion<T> where
    T: Unpin

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> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.