tag | 3867db8d357bd9bcca0db7b2605e73a5c6867166 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Wed Apr 24 20:07:44 2024 -0700 |
object | 0bcd1007f894f19ba97c75d013e2d953d374a520 |
aml_sta_341615000 (11423312,com.google.android.go.os.statsd,com.google.android.os.statsd)
commit | 0bcd1007f894f19ba97c75d013e2d953d374a520 | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 05:07:07 2023 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Fri Jul 07 05:07:07 2023 +0000 |
tree | 7f08bb33b7d46ae8a14a9f02449fada34d5375b2 | |
parent | 80704cf6c6f373bbcb46e8f20bd14e05119f5054 [diff] | |
parent | 52a25c5a6a55a55b1fb617cfd856988d4ccee621 [diff] |
Snap for 10453563 from 52a25c5a6a55a55b1fb617cfd856988d4ccee621 to mainline-os-statsd-release Change-Id: I2782b5a0d55ee69c9a0ef70280a683fb580b3a92
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.