• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..30-Mar-2022-

src/H30-Mar-2022-1,550609

tests/H30-Mar-2022-713590

.cargo-checksum.jsonH A D03-May-202289 11

CHANGELOG.mdH A D30-Mar-2022646 2216

Cargo.tomlH A D30-Mar-20221.2 KiB4036

LICENSEH A D30-Mar-20221 KiB2622

README.mdH A D30-Mar-20221.1 KiB5434

README.md

1# Slab
2
3Pre-allocated storage for a uniform data type.
4
5[![Crates.io][crates-badge]][crates-url]
6[![Build Status][ci-badge]][ci-url]
7
8[crates-badge]: https://img.shields.io/crates/v/slab
9[crates-url]: https://crates.io/crates/slab
10[ci-badge]: https://img.shields.io/github/workflow/status/tokio-rs/slab/CI/master
11[ci-url]: https://github.com/tokio-rs/slab/actions
12
13[Documentation](https://docs.rs/slab/0.4.3/slab/)
14
15## Usage
16
17To use `slab`, first add this to your `Cargo.toml`:
18
19```toml
20[dependencies]
21slab = "0.4.3"
22```
23
24Next, add this to your crate:
25
26```rust
27extern crate slab;
28
29use slab::Slab;
30
31let mut slab = Slab::new();
32
33let hello = slab.insert("hello");
34let world = slab.insert("world");
35
36assert_eq!(slab[hello], "hello");
37assert_eq!(slab[world], "world");
38
39slab[world] = "earth";
40assert_eq!(slab[world], "earth");
41```
42
43See [documentation](https://docs.rs/slab) for more details.
44
45## License
46
47This project is licensed under the [MIT license](LICENSE).
48
49### Contribution
50
51Unless you explicitly state otherwise, any contribution intentionally submitted
52for inclusion in `slab` by you, shall be licensed as MIT, without any additional
53terms or conditions.
54