IndexedLinkedHashMap

An indexable LinkedHashMap. Written in Rust.
About
Bring your own ordering data structure. Uses the standard library's HashMap
.
- If you use a data structure like
Vec
for keys, you can index easily. - If you use a data structure like
BinaryHeap
for keys, it doesn't make much sense to index on certain operations.- For example, this is how you'd call the set method:
ins.set(None, value)
.
- For example, this is how you'd call the set method:
Devlopers
- If you want to use your own data structure, implement the
Ordered
trait atindexedlinkedhashmap::traits::Ordered
.
Features
- collections_ordering_vec
- Support for
Vec
usage
- Support for
- collections_ordering_binary_heap
- Support for
BinaryHeap
usage
- Support for
Usage
[]
= "3.0.0"
[]
= { = "3.0.0", = [ "collections_ordering_vec", "collections_ordering_binary_heap" ] }
Examples
use BinaryHeap;
Testing
Run cargo test --features collections_ordering_vec,collections_ordering_binary_heap