Crate idmap

Source
Expand description

Efficient maps of integer id keys to values, backed by an underlying Vec.

However, unless a CompactIdMap is used, space requirements are O(n) the largest key. Any type that implements IntegerId can be used for the key, but no storage is wasted if the key can be represented from the id.

Re-exports§

pub use set::IdSet;
pub use self::direct::DirectIdMap;
pub use self::ordered::OrderedIdMap;

Modules§

direct
Type aliases for DirectIdMap
ordered
Type aliases for OrderedIdMap
set
Implements an IdSet using a bitset
table
The internal table types that can be used to power an IdMap.

Macros§

direct_idmap
Creates an DirectIdMap from a list of key-value pairs
idmap
Creates an IdMap from a list of key-value pairs
idset
Creates an IdSet from a list of elements

Structs§

IdMap
A map of mostly-contiguous IntegerId keys to values, backed by a Vec.
Iter
An iterator over the entries in a map
IterMut
An iterator over the entries in a map, giving mutable references to the values
Keys
An iterator over the keys in a map
OccupiedEntry
An entry in an IdMap where the value is present
RawDebug
A wrapper to debug the underlying representation of an IdMap
VacantEntry
An entry in an IdMap where the value is not present
Values
An iterator over the values in a map
ValuesMut
An iterator over mutable references to the values in a map

Enums§

Entry
An entry in an IdMap

Traits§

IntegerId
A type that can be uniquely identified by a 64 bit integer id