commit | 6a77a441fefa631949700dbe063969488925388f | [log] [tgz] |
---|---|---|
author | Elisei Zamakhov <[email protected]> | Thu Jul 11 12:42:26 2024 +0000 |
committer | Elisei Zamakhov <[email protected]> | Thu Jul 11 13:51:30 2024 +0000 |
tree | ad992311c8e188f2baa7ddd3bb7d0f5a87eba6b7 | |
parent | f40d8f94b68c67f6fa44f2f6343235f4ab11702b [diff] |
Mark apex-available Test: m Change-Id: Ifa7336382047da5cdbcd30b5fd70c42f52da1c2b
Pre-allocated storage for a uniform data type.
To use slab
, first add this to your Cargo.toml
:
[dependencies] slab = "0.4"
Next, add this to your crate:
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.