Bug: 153207806

Clone this repo:
  1. f40d8f9 Update Android.bp by running cargo_embargo am: 91a008d6fd by James Farrell · 4 weeks ago main master
  2. 91a008d Update Android.bp by running cargo_embargo by James Farrell · 4 weeks ago
  3. cf4a288 Empty merge of Android 24Q2 Release (ab/11526283) to aosp-main-future by Xin Li · 7 weeks ago
  4. 5861aaf Upgrade slab to 0.4.9 am: f4a1151ee3 am: bc151bf4ff by Jeff Vander Stoep · 4 months ago
  5. bc151bf Upgrade slab to 0.4.9 am: f4a1151ee3 by Jeff Vander Stoep · 4 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.