Struct id_set::IdSet [] [src]

pub struct IdSet { /* fields omitted */ }

A set of usize elements represented by a bit vector. Storage required is proportional to the maximum element in the set.

Methods

impl IdSet
[src]

Creates an empty IdSet.

Creates a IdSet filled with all elements from 0 to n.

Creates a empty IdSet that can hold elements up to n before reallocating.

Creates a set from a raw set of bytes.

Returns the number of elements in the set.

Removes all elements from the set.

Inserts the given elements into the set, returning true if it was not already in the set.

Removes the given element from the set, returning true if it was in the set.

Returns true if the given element is in the set.

Remove all elements that don't satisfy the predicate.

An iterator over all elements in increasing order.

A consuming iterator over all elements in increasing order.

Trait Implementations

impl Clone for IdSet
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for IdSet
[src]

Formats the value using the given formatter.

impl Default for IdSet
[src]

Returns the "default value" for a type. Read more

impl Eq for IdSet
[src]

impl PartialEq for IdSet
[src]

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

This method tests for !=.

impl Extend<Id> for IdSet
[src]

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

impl FromIterator<Id> for IdSet
[src]

Creates a value from an iterator. Read more

impl<'a> IntoIterator for &'a IdSet
[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