Struct rin_util::EnumSet[][src]

pub struct EnumSet<E> { /* fields omitted */ }

A specialized set implementation to use enum types.

It is a logic error for an item to be modified in such a way that the transformation of the item to or from a usize, as determined by the CLike trait, changes while the item is in the set. This is normally only possible through Cell, RefCell, global state, I/O, or unsafe code.

Implementations

impl<E> EnumSet<E>[src]

pub fn new() -> EnumSet<E>[src]

Returns an empty EnumSet.

impl<E: CLike> EnumSet<E>[src]

pub fn len(&self) -> usize[src]

Returns the number of elements in the given EnumSet.

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

Returns true if the EnumSet is empty.

pub fn clear(&mut self)[src]

pub fn is_disjoint(&self, other: &EnumSet<E>) -> bool[src]

Returns false if the EnumSet contains any enum of the given EnumSet.

pub fn is_superset(&self, other: &EnumSet<E>) -> bool[src]

Returns true if a given EnumSet is included in this EnumSet.

pub fn is_subset(&self, other: &EnumSet<E>) -> bool[src]

Returns true if this EnumSet is included in the given EnumSet.

pub fn union(&self, e: EnumSet<E>) -> EnumSet<E>[src]

Returns the union of both EnumSets.

pub fn intersection(&self, e: EnumSet<E>) -> EnumSet<E>[src]

Returns the intersection of both EnumSets.

pub fn insert(&mut self, e: E) -> bool[src]

Adds an enum to the EnumSet, and returns true if it wasn’t there before

pub fn remove(&mut self, e: &E) -> bool[src]

Removes an enum from the EnumSet

pub fn contains(&self, e: &E) -> bool[src]

Returns true if an EnumSet contains a given enum.

pub fn iter(&self) -> Iter<E>[src]

Returns an iterator over an EnumSet.

Trait Implementations

impl<E: CLike> BitAnd<EnumSet<E>> for EnumSet<E>[src]

type Output = EnumSet<E>

The resulting type after applying the & operator.

impl<E: CLike> BitOr<EnumSet<E>> for EnumSet<E>[src]

type Output = EnumSet<E>

The resulting type after applying the | operator.

impl<E: CLike> BitXor<EnumSet<E>> for EnumSet<E>[src]

type Output = EnumSet<E>

The resulting type after applying the ^ operator.

impl<E> Clone for EnumSet<E>[src]

impl<E: CLike + Debug> Debug for EnumSet<E>[src]

impl<E> Default for EnumSet<E>[src]

impl<'de, E> Deserialize<'de> for EnumSet<E>[src]

impl<'a, E: 'a + CLike + Copy> Extend<&'a E> for EnumSet<E>[src]

impl<E: CLike> Extend<E> for EnumSet<E>[src]

impl<E: CLike> FromIterator<E> for EnumSet<E>[src]

impl<E> Hash for EnumSet<E>[src]

impl<'a, E> IntoIterator for &'a EnumSet<E> where
    E: CLike
[src]

type Item = E

The type of the elements being iterated over.

type IntoIter = Iter<E>

Which kind of iterator are we turning this into?

impl<E> Ord for EnumSet<E>[src]

impl<E> PartialEq<EnumSet<E>> for EnumSet<E>[src]

impl<E> PartialOrd<EnumSet<E>> for EnumSet<E>[src]

impl<E> Serialize for EnumSet<E>[src]

impl<E: CLike> Sub<EnumSet<E>> for EnumSet<E>[src]

type Output = EnumSet<E>

The resulting type after applying the - operator.

impl<E> Copy for EnumSet<E>[src]

impl<E> Eq for EnumSet<E>[src]

Auto Trait Implementations

impl<E> RefUnwindSafe for EnumSet<E> where
    E: RefUnwindSafe

impl<E> Send for EnumSet<E> where
    E: Send

impl<E> Sync for EnumSet<E> where
    E: Sync

impl<E> Unpin for EnumSet<E> where
    E: Unpin

impl<E> UnwindSafe for EnumSet<E> where
    E: 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> From<T> for T[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

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