10个版本 (6个破坏性版本)
0.7.1 | 2023年5月11日 |
---|---|
0.7.0 | 2023年5月11日 |
0.6.1 | 2023年1月26日 |
0.5.1 | 2021年12月13日 |
0.1.0 | 2021年2月4日 |
#374 in 数据结构
4,544 每月下载量
用于 ddo
57KB
1K SLoC
smallbitset
此crate提供一系列能够存储小整数值的分配免费整数集合。
用法
在您的 Cargo.toml
中,您应该在依赖项部分添加以下行。
[dependencies]
smallbitset = "0.6.0"
然后在您的main代码中,您将简单地使用以下所示的可用的集合之一
use smallbitset::Set32;
fn main() {
let mut x = Set32::empty();
x = x.insert(1);
assert_eq!(Set32::singleton(1), x);
assert!(x.contains(1));
// and so on ... check the online documentation for the complete api details
}
依赖项
~150KB