commit | 2736bb275542b5ea5d5a7e6bc6582a481dcf625c | [log] [tgz] |
---|---|---|
author | Linux Build Service Account <lnxbuild@localhost> | Sun Jan 16 14:31:45 2022 -0800 |
committer | Linux Build Service Account <lnxbuild@localhost> | Sun Jan 16 14:31:45 2022 -0800 |
tree | 95d23281f1be722c5e7ff14d322b70b0a5120db1 | |
parent | deacb7f884e569873d0fce860d268190a16de7f3 [diff] | |
parent | f86c877e4642bd43b0f58befd301cc99ed7765f5 [diff] |
Merge f86c877e4642bd43b0f58befd301cc99ed7765f5 on remote branch Change-Id: I274e7dd7863317741a26fce20a53b1198b359d8a
Pre-allocated storage for a uniform data type.
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.
This project is licensed under the MIT license.
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.