uniset

Documentation Crates Actions Status

A hierarchical, growable bit set with support for in-place atomic operations.

The idea is based on [hibitset], but dynamically growing instead of using a fixed capacity. By being careful with the data layout, we can also support structural sharing between the local and atomic bitset variants.

Features

Examples

```rust use uniset::BitSet;

let mut set = BitSet::new(); assert!(set.isempty()); asserteq!(0, set.capacity());

set.set(127); set.set(128); assert!(!set.is_empty());

assert!(set.test(128)); asserteq!(vec![127, 128], set.iter().collect::>()); assert!(!set.isempty());

asserteq!(vec![127, 128], set.drain().collect::>()); assert!(set.isempty()); ```