Struct david_set::CastSet [] [src]

pub struct CastSet<T: Cast> { /* fields omitted */ }

A set implemented for types that can be cast to usize

Methods

impl<T: Cast> CastSet<T>
[src]

Creates an empty set..

Creates an empty set with the specified capacity.

Returns the number of elements in the set.

Reserves capacity for at least additional more elements to be inserted in the set. The collection may reserve more space to avoid frequent reallocations.

Adds a value to the set.

If the set did not have this value present, true is returned.

If the set did have this value present, false is returned.

Returns true if the set contains a value.

Removes an element, and returns true if that element was present.

Returns an iterator over the set.

Clears the set, returning all elements in an iterator.

Trait Implementations

impl<T: Debug + Cast> Debug for CastSet<T>
[src]

Formats the value using the given formatter.

impl<T: Clone + Cast> Clone for CastSet<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a, T: Cast> IntoIterator for &'a CastSet<T>
[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