tag | f9731beeab6aa39059aa4d8771bd1e38763241d0 | |
---|---|---|
tagger | Xin Li <delphij@google.com> | Wed Apr 24 20:17:04 2024 -0700 |
object | d26aa99fc1b119470c5cbb3f225af4e19db029b1 |
aml_odp_341610000 (11382236,com.google.android.go.ondevicepersonalization,com.google.android.ondevicepersonalization)
commit | d26aa99fc1b119470c5cbb3f225af4e19db029b1 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 07:14:56 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 07:14:56 2023 +0000 |
tree | 7f08bb33b7d46ae8a14a9f02449fada34d5375b2 | |
parent | c8e6467a1a1880d04b1204166773e67c826542e1 [diff] | |
parent | 52a25c5a6a55a55b1fb617cfd856988d4ccee621 [diff] |
Snap for 10453938 from 52a25c5a6a55a55b1fb617cfd856988d4ccee621 to mainline-odp-release Change-Id: I26faa2b46698c58c0400d9cc3f1f443fb3369af8
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.