tag | 2d4243bde424e223f1e8d88b0fdfd4312e7c9743 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Wed May 11 05:10:21 2022 +0000 |
object | 2ab5a48e4fc2e0ff1a36bcab0e0592aac3e24d2c |
Android mainline 12.0.0 release 88
commit | 2ab5a48e4fc2e0ff1a36bcab0e0592aac3e24d2c | [log] [tgz] |
---|---|---|
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Aug 12 12:49:18 2021 +0000 |
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | Thu Aug 12 12:49:18 2021 +0000 |
tree | 0ae352b18f96fcca3ce41cc57c7dc718af0a41e2 | |
parent | 5922e7ee56e0cbd4ea7e9f388b3de727c875f4a4 [diff] | |
parent | c7a0ca3f7fc2a1505551536e0b90e0d209a2a824 [diff] |
Snap for 7635729 from c7a0ca3f7fc2a1505551536e0b90e0d209a2a824 to mainline-ipsec-release Change-Id: I052e4dad0941afb62d5ef5bb09dc009649c7985f
Pre-allocated storage for a uniform data type.
To use slab
, first add this to your Cargo.toml
:
[dependencies] slab = "0.4.2"
Next, add this to your crate:
extern crate slab; 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.