openharmony_ci 924f3c0960 !2 README.OpenSource 中License信息整改
Merge pull request !2 from peizhe/master
2023-05-05 02:26:40 +00:00
2022-07-09 15:41:30 +09:00
2016-01-18 10:25:42 -08:00
2022-07-10 02:21:12 +09:00
2023-02-19 18:23:54 +01:00
2023-02-19 18:23:54 +01:00
2019-01-11 15:08:54 -08:00
2022-12-17 16:03:47 +09:00

Slab

Pre-allocated storage for a uniform data type.

Crates.io Build Status

Documentation

Usage

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.

License

This project is licensed under the MIT license.

Contribution

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.

S
Description
统一数据类型的预分配存储
Readme MIT 330 KiB
Languages
Rust 100%