Enum hamt::Hamt [] [src]

pub enum Hamt<K, V, HamtRef> {
    Empty,
    Leaf(HashBits, K, V),
    Bitmap(SizeBitmapVec<HamtRef>),
    Collision(HashBitsVec<(K, V)>),
}

Variants

Methods

impl<K, V, HamtRef> Hamt<K, V, HamtRef> where
    K: Hash + Eq + Clone,
    V: Clone,
    HamtRef: Clone + Deref<Target = Hamt<K, V, HamtRef>> + From<Hamt<K, V, HamtRef>>, 
[src]

Returns a key value iterator.

Returns an iterator that visits every key in an unspecified order.

Returns an iterator that visits every value in an unspecified order.

Returns a reference to the value corresponding to the given key, or None if there is no value associated with the key.

Returns true if the map contains the given key.

Returns a new map without an entry corresponding to the given key.

Modifies the value tied to the given key with the function f. Otherwise, the map returned is identical.

Updates the value at the given key using f. If f returns None, then the entry is removed.

Updates the value at the given key using f as in Self::update. If no value exists for the given key, then f is passed None.

Trait Implementations

impl<K: Debug, V: Debug, HamtRef: Debug> Debug for Hamt<K, V, HamtRef>
[src]

Formats the value using the given formatter.

impl<K: Clone, V: Clone, HamtRef: Clone> Clone for Hamt<K, V, HamtRef>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<K, V, HamtRef> Eq for Hamt<K, V, HamtRef> where
    K: Eq,
    V: Eq,
    HamtRef: Eq
[src]

impl<K, V, HamtRef> PartialEq for Hamt<K, V, HamtRef> where
    K: PartialEq,
    V: PartialEq,
    HamtRef: PartialEq
[src]

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

This method tests for !=.

impl<K, V, HamtRef> FromIterator<(K, V)> for Hamt<K, V, HamtRef> where
    K: Eq + Hash + Clone,
    V: Clone,
    HamtRef: Clone + Deref<Target = Hamt<K, V, HamtRef>> + From<Hamt<K, V, HamtRef>>, 
[src]

Creates a value from an iterator. Read more

impl<'a, K, V, HamtRef> FromIterator<(&'a K, &'a V)> for Hamt<K, V, HamtRef> where
    K: Eq + Hash + Clone,
    V: Clone,
    HamtRef: Clone + Deref<Target = Hamt<K, V, HamtRef>> + From<Hamt<K, V, HamtRef>>, 
[src]

Creates a value from an iterator. Read more

impl<'a, K, V, HamtRef> IntoIterator for &'a Hamt<K, V, HamtRef> where
    K: 'a + Clone + Hash + Eq,
    V: 'a + Clone,
    HamtRef: 'a + Clone + Deref<Target = Hamt<K, V, HamtRef>> + From<Hamt<K, V, HamtRef>>, 
[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, K, Q: ?Sized, V, HamtRef> Index<&'a Q> for Hamt<K, V, HamtRef> where
    K: Hash + Eq + Clone + Borrow<Q>,
    V: Clone,
    Q: Eq + Hash,
    HamtRef: Clone + Deref<Target = Hamt<K, V, HamtRef>> + From<Hamt<K, V, HamtRef>>, 
[src]

The returned type after indexing

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