tag | 7e62c8949a330cfec21b9691cfed7252ce086bce | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Mon Oct 28 23:43:09 2024 -0700 |
object | 4f9202fc96c177034b423185883282ddeccaa782 |
aml_sta_350911020 (12279057,com.google.android.go.os.statsd,com.google.android.os.statsd)
commit | 4f9202fc96c177034b423185883282ddeccaa782 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Jul 16 23:40:22 2024 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Tue Jul 16 23:40:22 2024 +0000 |
tree | ad992311c8e188f2baa7ddd3bb7d0f5a87eba6b7 | |
parent | 50b6f93c71e7ad573e0dac0f9e2b669a5e71b70f [diff] | |
parent | 5dde49d2e91d7a571830fc138762c6e5c8f9b4dc [diff] |
Snap for 12098956 from 5dde49d2e91d7a571830fc138762c6e5c8f9b4dc to mainline-os-statsd-release Change-Id: If9642a89ed379398cf00cd925c777bc613b6068e
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.