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> EnumSet<E> where
    E: CLike
[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> BitAnd<EnumSet<E>> for EnumSet<E> where
    E: CLike
[src]

type Output = EnumSet<E>

The resulting type after applying the & operator.

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

type Output = EnumSet<E>

The resulting type after applying the | operator.

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

type Output = EnumSet<E>

The resulting type after applying the ^ operator.

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

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

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

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

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

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

impl<E> FromIterator<E> for EnumSet<E> where
    E: CLike
[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> Sub<EnumSet<E>> for EnumSet<E> where
    E: CLike
[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> Any for T where
    T: Any
[src]

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

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

impl<T> CallHasher for T where
    T: Hash
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Any + Send + Sync
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

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

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

impl<T> IntoPnt<Point<T, U2>> for T where
    T: Scalar
[src]

impl<T> IntoPnt<Point<T, U3>> for T where
    T: Scalar
[src]

impl<T> IntoPnt<Point<T, U4>> for T where
    T: Scalar
[src]

impl<V> IntoPnt<V> for V[src]

impl<V> IntoVec<V> for V[src]

impl<T> JoinPnt<T, Point<T, U2>> for T where
    T: Scalar
[src]

type Output = Point<T, U3>

impl<T> JoinPnt<T, Point<T, U3>> for T where
    T: Scalar
[src]

type Output = Point<T, U4>

impl<T> JoinPnt<T, T> for T where
    T: Scalar
[src]

type Output = Point<T, U2>

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

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

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: Copy + PartialEq<T> + Debug + Any
[src]

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

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[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<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> CollisionObjectHandle for T where
    T: 'static + Copy + Hash + PartialEq<T> + Eq + Send + Sync
[src]

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

impl<N> NodeTrait for N where
    N: Copy + Ord + Hash
[src]

impl<T> Slottable for T where
    T: Copy
[src]