idmap

Crates.ioidmap
lib.rsidmap
version0.2.21
sourcesrc
created_at2017-08-16 16:50:34.329083
updated_at2021-09-06 16:47:38.73788
descriptionEfficient maps of integer id keys to values, backed by an underlying `Vec`
homepage
repositoryhttps://github.com/Techcable/rust-idmap
max_upload_size
id27775
size103,475
(Techcable)

documentation

README

rust-idmap Crates.io Documentation

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

Features

  • Compiles on stable rust
    • I only officially support the latest stable ;)
  • Automatically derived IntegerId for enums and newtype structs
    • Implemented in the idmap-derive proc_macro crate
  • Maintains insertion order of the entries, as there's an indirection like OrderMap.
    • Therefore, entries which aren't present take little space, as only a u32 needs to be stored.
    • This indirection can be avoided with a DirectIdMap which doesn't preserve order, and saves space when the ids of the map's keys are densly packed and mostly present.
Commit count: 31

cargo fmt