W3cubDocs

/Rust

Struct collections::enum_set::EnumSet

pub struct EnumSet<E> { /* fields omitted */ }
Deprecated since 1.16.0: long since replaced 🔬 This is a nightly-only experimental API. (enumset #37966)matches collection reform specification, waiting for dust to settle

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.

Methods

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

Deprecated since 1.16.0: long since replaced 🔬 This is a nightly-only experimental API. (enumset #37966)matches collection reform specification, waiting for dust to settle

Returns an empty EnumSet.

Deprecated since 1.16.0: long since replaced 🔬 This is a nightly-only experimental API. (enumset #37966)matches collection reform specification, waiting for dust to settle

Returns the number of elements in the given EnumSet.

Deprecated since 1.16.0: long since replaced 🔬 This is a nightly-only experimental API. (enumset #37966)matches collection reform specification, waiting for dust to settle

Returns true if the EnumSet is empty.

Deprecated since 1.16.0: long since replaced 🔬 This is a nightly-only experimental API. (enumset #37966)matches collection reform specification, waiting for dust to settle

Deprecated since 1.16.0: long since replaced 🔬 This is a nightly-only experimental API. (enumset #37966)matches collection reform specification, waiting for dust to settle

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

Deprecated since 1.16.0: long since replaced 🔬 This is a nightly-only experimental API. (enumset #37966)matches collection reform specification, waiting for dust to settle

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

Deprecated since 1.16.0: long since replaced 🔬 This is a nightly-only experimental API. (enumset #37966)matches collection reform specification, waiting for dust to settle

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

Deprecated since 1.16.0: long since replaced 🔬 This is a nightly-only experimental API. (enumset #37966)matches collection reform specification, waiting for dust to settle

Returns the union of both EnumSets.

Deprecated since 1.16.0: long since replaced 🔬 This is a nightly-only experimental API. (enumset #37966)matches collection reform specification, waiting for dust to settle

Returns the intersection of both EnumSets.

Deprecated since 1.16.0: long since replaced 🔬 This is a nightly-only experimental API. (enumset #37966)matches collection reform specification, waiting for dust to settle

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

Deprecated since 1.16.0: long since replaced 🔬 This is a nightly-only experimental API. (enumset #37966)matches collection reform specification, waiting for dust to settle

Removes an enum from the EnumSet

Deprecated since 1.16.0: long since replaced 🔬 This is a nightly-only experimental API. (enumset #37966)matches collection reform specification, waiting for dust to settle

Returns true if an EnumSet contains a given enum.

Deprecated since 1.16.0: long since replaced 🔬 This is a nightly-only experimental API. (enumset #37966)matches collection reform specification, waiting for dust to settle

Returns an iterator over an EnumSet.

Trait Implementations

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

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

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

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

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

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

This method returns an Ordering between self and other. Read more

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

Feeds this value into the state given, updating the hasher as necessary.

Feeds a slice of this type into the state provided.

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter.

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

The resulting type after applying the - operator

The method for the - operator

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

The resulting type after applying the | operator

The method for the | operator

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

The resulting type after applying the & operator

The method for the & operator

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

The resulting type after applying the ^ operator

The method for the ^ operator

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

Creates a value from an iterator. Read more

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

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Creates an iterator from a value. Read more

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

Extends a collection with the contents of an iterator. Read more

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

Extends a collection with the contents of an iterator. Read more

© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/collections/enum_set/struct.EnumSet.html