rust-idmap

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
IntegerIdfor enums and newtype structs- Implemented in the
idmap-deriveproc_macro crate
- Implemented in the
- 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
u32needs to be stored. - This indirection can be avoided with a
DirectIdMapwhich doesn't preserve order, and saves space when the ids of the map's keys are densely packed and mostly present.
- Therefore, entries which aren't present take little space, as only a
License
Licensed under either the Apache 2.0 License or MIT License at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.