Read Write Store
A concurrent, unordered collection for Rust, where each element has an internally generated ID and a read-write lock.
A store has O(1) time complexity for insertion, removal and lookups, although memory allocations triggered by insertion may cause a performance spike.
Example
// Note that we only need an immutable reference to the store
let store = new;
// Inserting an element yields an ID
let id = store.insert;
// Elements can of course be removed using their ID
assert_eq!;
// Now if we try to read using the ID, it will fail gracefully
assert!;
Documentation
The latest documentation can be found here.