| Crates.io | smallbitset |
| lib.rs | smallbitset |
| version | 0.7.1 |
| created_at | 2021-02-04 15:31:01.33311+00 |
| updated_at | 2023-05-11 11:16:22.016994+00 |
| description | This crate provides a series of allocation free sets capable of holding small integer values. |
| homepage | |
| repository | https://github.com/xgillard/smallbitset |
| max_upload_size | |
| id | 350558 |
| size | 59,553 |
This crate provides a series of allocation free integers set capable of holding small integer values.
In your Cargo.toml, you should add the following line to your dependencies
section.
[dependencies]
smallbitset = "0.6.0"
Then in your main code, you will simply use one of the available collections as shown below:
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
}