Bug: 153207806

Clone this repo:
  1. bc151bf Upgrade slab to 0.4.9 am: f4a1151ee3 by Jeff Vander Stoep · 3 months ago main master
  2. f4a1151 Upgrade slab to 0.4.9 by Jeff Vander Stoep · 3 months ago
  3. b1e9ec3 Migrate to cargo_embargo. am: ef64a94361 am: 83a5ae1063 am: 0365fc8d9d by Andrew Walbran · 5 months ago
  4. 85366d8 Migrate to cargo_embargo. am: ef64a94361 am: 4347594c5e am: d44bd694de by Andrew Walbran · 5 months ago
  5. 0365fc8 Migrate to cargo_embargo. am: ef64a94361 am: 83a5ae1063 by Andrew Walbran · 5 months ago

Slab

Pre-allocated storage for a uniform data type.

Crates.io Build Status

Documentation

Usage

To use slab, first add this to your Cargo.toml:

[dependencies]
slab = "0.4"

Next, add this to your crate:

use slab::Slab;

let mut slab = Slab::new();

let hello = slab.insert("hello");
let world = slab.insert("world");

assert_eq!(slab[hello], "hello");
assert_eq!(slab[world], "world");

slab[world] = "earth";
assert_eq!(slab[world], "earth");

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 slab by you, shall be licensed as MIT, without any additional terms or conditions.