Bug: 153207806

Clone this repo:
  1. 64fcafb Merge "Make slab available to product and vendor" am: 61af609cca by Matthew Maurer · 3 weeks ago master
  2. 61af609 Merge "Make slab available to product and vendor" by Matthew Maurer · 3 weeks ago
  3. 2947372 Make slab available to product and vendor by Matthew Maurer · 3 weeks ago
  4. 8e9c2ac Upgrade slab to 0.4.8 am: b518a04a6e by Jeff Vander Stoep · 3 weeks ago
  5. b518a04 Upgrade slab to 0.4.8 by Jeff Vander Stoep · 3 weeks 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.