Bug: 153207806

Clone this repo:
  1. ef64a94 Migrate to cargo_embargo. by Andrew Walbran · 2 weeks ago main master
  2. b4d6ef5 Merge "Make slab available to product and vendor" am: 61af609cca am: 64fcafb704 am: 37a29094c1 by Matthew Maurer · 9 months ago android14-dev
  3. 37a2909 Merge "Make slab available to product and vendor" am: 61af609cca am: 64fcafb704 by Matthew Maurer · 9 months ago
  4. 64fcafb Merge "Make slab available to product and vendor" am: 61af609cca by Matthew Maurer · 9 months ago android-u-beta-1-gpl
  5. 61af609 Merge "Make slab available to product and vendor" by Matthew Maurer · 9 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.