pub struct HashMapReadSnapshot<'a, K, V> where
    K: Hash + Eq + Clone + Debug + Sync + Send + 'static,
    V: Clone + Sync + Send + 'static, 
{ /* private fields */ }
Expand description

A point-in-time snapshot of the tree from within a read OR write. This is useful for building other transactional types ontop of this structure, as you need a way to downcast both HashMapReadTxn or HashMapWriteTxn to a singular reader type for a number of get_inner() style patterns.

This snapshot IS safe within the read thread due to the nature of the implementation borrowing the inner tree to prevent mutations within the same thread while the read snapshot is open.

Implementations

Retrieve a value from the tree. If the value exists, a reference is returned as Some(&V), otherwise if not present None is returned.

Assert if a key exists in the tree.

Returns the current number of k:v pairs in the tree

Determine if the set is currently empty

Iterator over (&K, &V) of the set

Iterator over &K

Iterator over &V

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.