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]

[src]

Creates an empty IdSet.

[src]

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

[src]

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

[src]

Returns the number of distinct elements in the set.

[src]

Returns true if the set is empty.

[src]

Returns capacity of the set. Inserting any elements less than this will not cause reallocation.

[src]

Resizes the set such that capacity() >= cap.

[src]

Resizes the set to minimise allocated memory.

[src]

Removes all elements from the set.

[src]

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

[src]

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

[src]

Returns true if the given element is in the set.

[src]

Remove all elements that don't satisfy the predicate.

[src]

Returns the underlying blocks as a slice.

[src]

An iterator over all elements in increasing order.

[src]

Returns an iterator over the blocks of the underlying representation.

[src]

Returns a consuming iterator over the blocks of the underlying representation.

[src]

Takes the union of the set with another. Equivalent to self | other.

[src]

Takes the intersection of the set with another. Equivalent to self & other.

[src]

Takes the difference of the set with another. Equivalent to self - other.

[src]

Takes the symmetric difference of the set with another. Equivalent to self ^ other.

[src]

Consumes the set and takes the union with another.

[src]

Consumes the set and takes the intersection with another.

[src]

Consumes the set and takes the difference with another.

[src]

Consumes the set and takes the symmetric difference with another.

[src]

Take the union of the set inplace with another set. Equivalent to *self |= other.

[src]

Take the intersection of the set inplace with another set. Equivalent to *self &= other.

[src]

Take the difference of the set inplace with another set. Equivalent to *self -= other.

[src]

Take the symmetric difference of the set inplace with another set. Equivalent to *self ^= other.

[src]

Returns true if the sets are disjoint.

[src]

Returns true if self is a superset of other.

[src]

Returns true if self is a subset of other.

Trait Implementations

impl Clone for IdSet
[src]

[src]

Returns a copy of the value. Read more

[src]

Performs copy-assignment from source. Read more

impl Debug for IdSet
[src]

[src]

Formats the value using the given formatter.

impl Default for IdSet
[src]

[src]

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

impl Eq for IdSet
[src]

impl PartialEq for IdSet
[src]

[src]

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

1.0.0
[src]

This method tests for !=.

impl Extend<Id> for IdSet
[src]

[src]

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

impl FromIterator<Id> for IdSet
[src]

[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?

[src]

Creates an iterator from a value. Read more

impl IntoIterator for IdSet
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

[src]

Creates an iterator from a value. Read more

impl<'a> IntoBlockIterator for &'a IdSet
[src]

The raw iterator type.

[src]

Creates a block iterator.

impl IntoBlockIterator for IdSet
[src]

The raw iterator type.

[src]

Creates a block iterator.

impl<'a, I> BitAnd<I> for &'a IdSet where
    I: IntoBlockIterator
[src]

The resulting type after applying the & operator.

[src]

Takes the intersection of two objects.

impl<'a, I> BitOr<I> for &'a IdSet where
    I: IntoBlockIterator
[src]

The resulting type after applying the | operator.

[src]

Takes the union of two objects.

impl<'a, I> BitXor<I> for &'a IdSet where
    I: IntoBlockIterator
[src]

The resulting type after applying the ^ operator.

[src]

Takes the symmetric difference of two objects.

impl<'a, I> Sub<I> for &'a IdSet where
    I: IntoBlockIterator
[src]

The resulting type after applying the - operator.

[src]

Takes the difference of two objects.

impl<I> BitAnd<I> for IdSet where
    I: IntoBlockIterator
[src]

The resulting type after applying the & operator.

[src]

Takes the intersection of two objects.

impl<I> BitOr<I> for IdSet where
    I: IntoBlockIterator
[src]

The resulting type after applying the | operator.

[src]

Takes the union of two objects.

impl<I> BitXor<I> for IdSet where
    I: IntoBlockIterator
[src]

The resulting type after applying the ^ operator.

[src]

Takes the symmetric difference of two objects.

impl<I> Sub<I> for IdSet where
    I: IntoBlockIterator
[src]

The resulting type after applying the - operator.

[src]

Takes the difference of two objects.

impl<I> BitAndAssign<I> for IdSet where
    I: IntoBlockIterator
[src]

[src]

Takes the inplace intersection of the set with another.

impl<I> BitOrAssign<I> for IdSet where
    I: IntoBlockIterator
[src]

[src]

Takes the inplace union of the set with another.

impl<I> BitXorAssign<I> for IdSet where
    I: IntoBlockIterator
[src]

[src]

Takes the inplace symmetric difference of the set with another.

impl<I> SubAssign<I> for IdSet where
    I: IntoBlockIterator
[src]

[src]

Takes the inplace difference of the set with another.