• Home
Name Date Size #Lines LOC

..--

patches/06-Sep-2024-1412

src/06-Sep-2024-1,717716

tests/06-Sep-2024-786653

.cargo_vcs_info.jsonD06-Sep-202494 66

.gitignoreD06-Sep-202424 43

Android.bpD06-Sep-20241.6 KiB7065

CHANGELOG.mdD06-Sep-20241.5 KiB5537

Cargo.tomlD06-Sep-20241.2 KiB5648

Cargo.toml.origD06-Sep-2024786 3428

LICENSED06-Sep-20241 KiB2622

METADATAD06-Sep-2024593 2119

MODULE_LICENSE_MITD06-Sep-20240

NOTICED06-Sep-20241 KiB2622

OWNERSD06-Sep-202440 21

README.mdD06-Sep-20241.1 KiB5233

TEST_MAPPINGD06-Sep-20241.1 KiB5857

build.rsD06-Sep-2024928 2518

cargo_embargo.jsonD06-Sep-2024186 1110

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/actions/workflow/status/tokio-rs/slab/ci.yml?branch=master
11[ci-url]: https://github.com/tokio-rs/slab/actions
12
13[Documentation](https://docs.rs/slab)
14
15## Usage
16
17To use `slab`, first add this to your `Cargo.toml`:
18
19```toml
20[dependencies]
21slab = "0.4"
22```
23
24Next, add this to your crate:
25
26```rust
27use slab::Slab;
28
29let mut slab = Slab::new();
30
31let hello = slab.insert("hello");
32let world = slab.insert("world");
33
34assert_eq!(slab[hello], "hello");
35assert_eq!(slab[world], "world");
36
37slab[world] = "earth";
38assert_eq!(slab[world], "earth");
39```
40
41See [documentation](https://docs.rs/slab) for more details.
42
43## License
44
45This project is licensed under the [MIT license](LICENSE).
46
47### Contribution
48
49Unless you explicitly state otherwise, any contribution intentionally submitted
50for inclusion in `slab` by you, shall be licensed as MIT, without any additional
51terms or conditions.
52