abrasion/third_party/cargo/vendor/slab-0.4.2
q3k 4a50bbf00d third_party/cargo: re-raze, fix winapi for windows 2021-05-03 23:43:36 +02:00
..
src bump winit, vulkano, ... 2020-03-17 00:00:50 +01:00
tests bump winit, vulkano, ... 2020-03-17 00:00:50 +01:00
.cargo-checksum.json bump winit, vulkano, ... 2020-03-17 00:00:50 +01:00
BUILD.bazel third_party/cargo: re-raze, fix winapi for windows 2021-05-03 23:43:36 +02:00
CHANGELOG.md bump winit, vulkano, ... 2020-03-17 00:00:50 +01:00
Cargo.toml bump winit, vulkano, ... 2020-03-17 00:00:50 +01:00
LICENSE bump winit, vulkano, ... 2020-03-17 00:00:50 +01:00
README.md bump winit, vulkano, ... 2020-03-17 00:00:50 +01:00

README.md

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.2"

Next, add this to your crate:

extern crate slab;

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.