idmap-derive

Crates.ioidmap-derive
lib.rsidmap-derive
version0.2.22
created_at2017-08-16 16:50:06.260915+00
updated_at2025-07-23 11:17:23.466033+00
descriptionAutomaticatically derives traits for the idmap crate
homepage
repositoryhttps://github.com/DuckLogic/idmap.rs
max_upload_size
id27774
size9,599
(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 densely packed and mostly present.

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.

Commit count: 0

cargo fmt