Crate bitarr

source ·
Expand description

BitSet

A compact data structure for storing bits.

The BitSet struct is a low-level data structure that stores a sequence of bits and provides methods for accessing and manipulating those bits.

It supports operations such as setting and clearing individual bits, and computing the union and intersection of two bit sets.

Examples

let mut bs = BitSet::from(0u8);

bs.set(3);
bs.set(7);

assert_eq!(bs.get(3), Some(true));
assert_eq!(bs.get(7), Some(true));
assert_eq!(bs.get(2), Some(false));

Modules

Traits for types that can be used to store bits.

Structs

A compact data structure for storing bits

Traits

A trait for collecting an iterator into a value as an operation that can fail.