Struct collections::enum_set::EnumSetExperimental [-]  [+] [src]

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

A specialized set implementation to use enum types.

Methods

impl<E: CLike> EnumSet<E>

fn empty() -> EnumSet<E>

Deprecated: Renamed to new.

fn new() -> EnumSet<E>

Returns an empty EnumSet.

fn len(&self) -> uint

Returns the number of elements in the given EnumSet.

fn is_empty(&self) -> bool

Returns true if the EnumSet is empty.

fn clear(&mut self)

fn intersects(&self, e: EnumSet<E>) -> bool

Returns true if the EnumSet contains any enum of the given EnumSet. Deprecated: Use is_disjoint.

fn is_disjoint(&self, other: &EnumSet<E>) -> bool

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

fn is_superset(&self, other: &EnumSet<E>) -> bool

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

fn is_subset(&self, other: &EnumSet<E>) -> bool

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

fn union(&self, e: EnumSet<E>) -> EnumSet<E>

Returns the union of both EnumSets.

fn intersection(&self, e: EnumSet<E>) -> EnumSet<E>

Returns the intersection of both EnumSets.

fn add(&mut self, e: E)

Deprecated: Use insert.

fn insert(&mut self, e: E) -> bool

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

fn remove(&mut self, e: &E) -> bool

Removes an enum from the EnumSet

fn contains_elem(&self, e: E) -> bool

Deprecated: use contains.

fn contains(&self, e: &E) -> bool

Returns true if an EnumSet contains a given enum.

fn iter(&self) -> Iter<E>

Returns an iterator over an EnumSet.

Trait Implementations

impl<E> Copy for EnumSet<E>

impl<E: CLike + Show> Show for EnumSet<E>

fn fmt(&self, fmt: &mut Formatter) -> Result

impl<E: CLike> Sub<EnumSet<E>, EnumSet<E>> for EnumSet<E>

fn sub(self, e: EnumSet<E>) -> EnumSet<E>

impl<E: CLike> BitOr<EnumSet<E>, EnumSet<E>> for EnumSet<E>

fn bitor(self, e: EnumSet<E>) -> EnumSet<E>

impl<E: CLike> BitAnd<EnumSet<E>, EnumSet<E>> for EnumSet<E>

fn bitand(self, e: EnumSet<E>) -> EnumSet<E>

impl<E: CLike> BitXor<EnumSet<E>, EnumSet<E>> for EnumSet<E>

fn bitxor(self, e: EnumSet<E>) -> EnumSet<E>

impl<E: CLike> FromIterator<E> for EnumSet<E>

fn from_iter<I: Iterator<E>>(iterator: I) -> EnumSet<E>

impl<E: CLike> Extend<E> for EnumSet<E>

fn extend<I: Iterator<E>>(&mut self, iterator: I)

Derived Implementations

impl<__S: Writer, E: Hash<__S>> Hash<__S> for EnumSet<E>

fn hash(&self, __arg_0: &mut __S)

impl<E: Ord> Ord for EnumSet<E>

fn cmp(&self, __arg_0: &EnumSet<E>) -> Ordering

impl<E: PartialOrd> PartialOrd for EnumSet<E>

fn partial_cmp(&self, __arg_0: &EnumSet<E>) -> Option<Ordering>

fn lt(&self, __arg_0: &EnumSet<E>) -> bool

fn le(&self, __arg_0: &EnumSet<E>) -> bool

fn gt(&self, __arg_0: &EnumSet<E>) -> bool

fn ge(&self, __arg_0: &EnumSet<E>) -> bool

impl<E: Eq> Eq for EnumSet<E>

impl<E: PartialEq> PartialEq for EnumSet<E>

fn eq(&self, __arg_0: &EnumSet<E>) -> bool

fn ne(&self, __arg_0: &EnumSet<E>) -> bool

impl<E: Clone> Clone for EnumSet<E>

fn clone(&self) -> EnumSet<E>

fn clone_from(&mut self, source: &Self)