Crate idmap [] [src]

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;

Modules

set
table

The internal table types that can be used to power an IdMap.

Macros

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
IterMut
Keys
OccupiedEntry
RawDebug

A wrapper to debug the underlying representation of an IdMap

VacantEntry
Values
ValuesMut

Enums

Entry

Traits

IntegerId

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

Type Definitions

DirectIdMap

An IdMap that stores its entries without any indirection, but takes much more space when entries are missing.

OrderedIdMap

The default IdMap that preserves insertion order and requires little space when keys have missing entries.