Colony
An unordered data-structure with O(1) lookup, removal, iteration and O(1) amortized insertion.
Like a faster HashMap that chooses its own keys.
Also similar to a Vec<Option<T>>, where instead of calling Vec::remove elements are removed by setting the element to None.
See the documentation for more information.
This crate is partly a port of plf::colony, which is a
proposed addition
to the C++ standard library under the name std::hive.
Example
let mut colony = new;
// Insert
let foo_handle = colony.insert;
let bar_handle = colony.insert;
// Remove
assert_eq!;
// Lookup
assert_eq!;
assert_eq!;
// Iteration
for in colony.iter