Handlebox
Handlebox is a simple map-like collection that reuses unused keys. Right now it's hard-coded to use u32
keys.
To install, add this line to your Cargo.toml:
[]
= "0.2.0"
Note that Handlebox has not yet reached version 1.0, so the API may change drastically between releases.
Example
use *;
// Creating
let mut c = new;
// Adding values
let h1 = c.add;
// Accessing values
assert_eq!;
// Removing values
c.remove;
// You can access the internal BTreeMap<u32, V> with the internal_map() method
assert_eq!;