tag | 7b4a1b229ac5e39503bd44e9e057fdd45df30bce | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Mon Oct 28 23:30:51 2024 -0700 |
object | 9d9786f502aaf9d871c4cf21583de8e71f27b4d2 |
aml_odp_350923040 (12265887,com.google.android.go.ondevicepersonalization,com.google.android.ondevicepersonalization)
commit | 9d9786f502aaf9d871c4cf21583de8e71f27b4d2 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 12 01:20:14 2024 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 12 01:20:14 2024 +0000 |
tree | ad992311c8e188f2baa7ddd3bb7d0f5a87eba6b7 | |
parent | f0d34595e5045f78b0f6b24089fe8c161b6f148e [diff] | |
parent | 5dde49d2e91d7a571830fc138762c6e5c8f9b4dc [diff] |
Snap for 12079985 from 5dde49d2e91d7a571830fc138762c6e5c8f9b4dc to mainline-odp-release Change-Id: I735100f9982956316a8610dc56c105f61f0f1804
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.