#slab #allocator

slab

Pre-allocated storage for a uniform data type

8 releases

0.4.1 Aug 4, 2018
0.4.0 Aug 2, 2017
0.3.0 Sep 1, 2016
0.2.0 Apr 28, 2016
0.1.0 Jun 15, 2015

#1 in Memory management

Download history 39036/week @ 2018-09-14 47418/week @ 2018-09-21 40824/week @ 2018-09-28 45180/week @ 2018-10-05 42847/week @ 2018-10-12 44570/week @ 2018-10-19 44377/week @ 2018-10-26 49036/week @ 2018-11-02 49322/week @ 2018-11-09 51991/week @ 2018-11-16 42761/week @ 2018-11-23 48352/week @ 2018-11-30 43483/week @ 2018-12-07

171,639 downloads per month
Used in 1,908 crates (69 directly)

MIT license

28KB
274 lines

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:

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.

No runtime deps