Generic Slab
generic_slab
is a fork of slab
that provides more control over the key and storage types. Using a generic approach you can for example implement strong typed keys that must fit the data type stored in the slab, or you can use a fixed size array as backing storage for the slab data.
Usage
To use generic_slab
, first add this to your Cargo.toml
:
[]
= "0.1"
Next, add this to your crate:
use Slab;
let mut slab = new;
let hello = slab.insert;
let world = slab.insert;
assert_eq!;
assert_eq!;
slab = "earth";
assert_eq!;
See documentation for more details.
License
This project is licensed under the MIT license.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in generic_slab
by you, shall be licensed as MIT, without any additional
terms or conditions.