Struct phf_mut::Map [] [src]

pub struct Map<V, H> { /* fields omitted */ }

A mutable, perfectly-hashed map. Note that a Map is always full, so you might prefer std::collections::HashMap for sparse maps.

Methods

impl<V: Default, H: PerfectHash> Map<V, H>
[src]

Create a new Map full default values. Also see from_initial and from_element.

impl<V: Copy, H: PerfectHash> Map<V, H>
[src]

Create a new Map full of copies of some value. Also see from_initial and new.

impl<V, H: HashInverse> Map<V, H>
[src]

Directly create a new iterator over entries: Iterator<Item=(K,&V)>.

Directly create a new iterator over mutable entries: Iterator<Item=(K,&mut V)>.

impl<V, H: PerfectHash> Map<V, H>
[src]

Create a new Map from a given vector of values. The vector must be compatible to the PerfectHash. Also see new and from_element.

Overwrite the currently stored value for key k by v. The name insert is s homage to HashMap::insert.

Swaps the currently stored value for key k with v, so the old value is now stored in v.

Directly get a reference the value for key k. Also see the Index implementation.

Directly get a mutable reference the value for key k. Also see the Index implementation.

impl<V, H> Map<V, H>
[src]

Returns true if the map contains no elements.

Returns the amount of entries, which is always equal to the hasher's domain (i.e., hasher.size()).

Directly create a new iterator over the values: Iterator<Item=&V>.

Directly create a new iterator over the mutable values: Iterator<Item=&mut V>.

Trait Implementations

impl<'a, V, H: HashInverse> IntoIterator for &'a Map<V, H>
[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<'a, V, H: HashInverse> IntoIterator for &'a mut Map<V, H>
[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<V, H> Debug for Map<V, H> where
    V: Debug
[src]

Formats the value using the given formatter.

impl<V: Clone, H: Clone> Clone for Map<V, H>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<V, H: PerfectHash> Index<H::K> for Map<V, H>
[src]

The returned type after indexing

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

impl<V, H: PerfectHash> IndexMut<H::K> for Map<V, H>
[src]

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