用于 Rust 的板块分配器
要使用 slab,首先将以下内容添加到您的 Cargo.toml:
slab = "0.4"接下来,将其添加到您的箱子中:
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");有关更多详细信息,请参阅 文档。
std 的 API。serde 支持 (实现 Serialize 和 Deserialize 特性)。本项目遵循 MIT 许可证。
除非您明确声明否则,您故意提交的任何用于"slab"的贡献,都将以 MIT 许可证授予,不附加任何其他条款或条件。
Documentation [dependencies]
暂无开放 Issues,或尚未同步最近议题。