Struct phf::Map[][src]

pub struct Map<K: 'static, V: 'static> { /* fields omitted */ }

An immutable map constructed at compile time.

Note

The fields of this struct are public so that they may be initialized by the phf_map! macro and code generation. They are subject to change at any time and should never be accessed directly.

Methods

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

Returns true if the Map is empty.

Returns the number of entries in the Map.

Determines if key is in the Map.

Returns a reference to the value that key maps to.

Returns a reference to the map's internal static instance of the given key.

This can be useful for interning schemes.

Like get, but returns both the key and the value.

Important traits for Entries<'a, K, V>

Returns an iterator over the key/value pairs in the map.

Entries are returned in an arbitrary but fixed order.

Important traits for Keys<'a, K, V>

Returns an iterator over the keys in the map.

Keys are returned in an arbitrary but fixed order.

Important traits for Values<'a, K, V>

Returns an iterator over the values in the map.

Values are returned in an arbitrary but fixed order.

Trait Implementations

impl<K, V> Debug for Map<K, V> where
    K: Debug,
    V: Debug
[src]

Formats the value using the given formatter. Read more

impl<'a, K, V, T: ?Sized> Index<&'a T> for Map<K, V> where
    T: Eq + PhfHash,
    K: Borrow<T>, 
[src]

The returned type after indexing.

Important traits for &'a mut R

Performs the indexing (container[index]) operation.

impl<'a, K, V> IntoIterator for &'a Map<K, V>
[src]

The type of the elements being iterated over.

Which kind of iterator are we turning this into?

Important traits for Entries<'a, K, V>

Creates an iterator from a value. Read more

Auto Trait Implementations

impl<K, V> Send for Map<K, V> where
    K: Send + Sync,
    V: Send + Sync

impl<K, V> Sync for Map<K, V> where
    K: Sync,
    V: Sync