Struct id_map::IdMap [] [src]

pub struct IdMap<T> { /* fields omitted */ }

A container that gives each item a unique id.

Methods

impl<T> IdMap<T>
[src]

Creates an empty IdMap<T>.

Creates an IdMap<T> with the specified capacity.

Inserts a value into the map and returns its id.

Removes an id from the map, returning its value if it was previously in the map.

An iterator over all ids in increasing order.

An iterator over all values.

A mutable iterator over all values.

An iterator over id-value pairs in order of increasing ids.

A mutable iterator over id-value pairs in order of increasing ids.

Returns true if the map contains a value for the specified id.

Trait Implementations

impl<T> Drop for IdMap<T>
[src]

A method called when the value goes out of scope. Read more

impl<T: Clone> Clone for IdMap<T>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<T: Debug> Debug for IdMap<T>
[src]

Formats the value using the given formatter.

impl<T> Default for IdMap<T>
[src]

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

impl<T: Eq> Eq for IdMap<T>
[src]

impl<T: PartialEq> PartialEq for IdMap<T>
[src]

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

This method tests for !=.

impl<T> Extend<T> for IdMap<T>
[src]

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

impl<T> FromIterator<T> for IdMap<T>
[src]

Creates a value from an iterator. Read more

impl<'a, T> IntoIterator for &'a IdMap<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

impl<T> Index<Id> for IdMap<T>
[src]

The returned type after indexing

The method for the indexing (container[index]) operation

impl<T> IndexMut<Id> for IdMap<T>
[src]

The method for the mutable indexing (container[index]) operation