Crate stable_map

Source
Expand description

A hash map with temporarily-stable indices.

This crate provides a hash map where each key is associated with an index. This index remains stable unless the user explicitly compacts the map. This allows for concurrent iteration over and modification of the map.

Structs§

Drain
A draining iterator over the entries of a StableMap in arbitrary order. The iterator element type is (K, V).
IntoIter
An owning iterator over the entries of a StableMap in arbitrary order. The iterator element type is (K, V).
IntoKeys
An owning iterator over the keys of a StableMap in arbitrary order. The iterator element type is K.
IntoValues
An owning iterator over the values of a StableMap in arbitrary order. The iterator element type is V.
Iter
An iterator over the entries of a StableMap in arbitrary order. The iterator element type is (&'a K, &'a V).
IterMut
A mutable iterator over the entries of a StableMap in arbitrary order. The iterator element type is (&'a K, &'a mut V).
Keys
An iterator over the keys of a StableMap in arbitrary order. The iterator element type is &'a K.
OccupiedEntry
A view into an occupied entry in a StableMap. It is part of the Entry and EntryRef enums.
OccupiedError
The error returned by try_insert when the key already exists.
StableMap
A hash map with temporarily-stable indices.
VacantEntry
A view into a vacant entry in a StableMap. It is part of the Entry enum.
VacantEntryRef
A view into a vacant entry in a StableMap. It is part of the EntryRef enum.
Values
An iterator over the values of a StableMap in arbitrary order. The iterator element type is &'a V.
ValuesMut
A mutable iterator over the values of a StableMap in arbitrary order. The iterator element type is &'a mut V.

Enums§

Entry
A view into a single entry in a map, which may either be vacant or occupied.
EntryRef
A view into a single entry in a map, which may either be vacant or occupied, with any borrowed form of the map’s key type.