indexmap is a data structure library for Rust that implements a regular hash table with some extra features.
It has an interface that is drop-in compatible with the map and set types from the Rust standard library. The extra features it implements are foremost:
- The iteration order is deterministic and independent of the hash function used
- Limited element order stability. Stable over insertion, extension, de/serialization, through retain and many other operations.
- Look up elements by either their key or their numerical index
- Sort the key-value pairs in place! The sort preserves the key lookup of course, while the iteration and indexing order is updated.