fixed-map
Note: this crate is still in heavy development. Please be careful!
This crate provides a map implementation that relies on fixed-size backing storage.
It accomplishes this by deriving an optimal storage strategy from the key to be used in the map
using the Key
derive:
let mut map = new;
assert_eq!;
map.insert;
assert_eq!;
assert_eq!;
Missing APIs
The API of this project is incomplete since it is experimental. You can help by adding more!
Why does this crate exist?
There are many cases where you want associate a value with a small, fixed number of elements identified by an enum.
For example, let's say you have a game where each room has something in for directions:
Now we can use this map to associate an item with each direction.
let mut map = new;
map.insert;
LICENSE
This project is distributed under the terms of both the MIT license and the Apache License (Version 2.0).
This project contains code derived from HashMap (Rust stdlib).