Expand description
SmallBitVec
is a bit vector, a vector of single-bit values stored compactly in memory.
SmallBitVec grows dynamically, like the standard Vec<T>
type. It can hold up to about one
word of bits inline (without a separate heap allocation). If the number of bits exceeds this
inline capacity, it will allocate a buffer on the heap.
§Example
use smallbitvec::SmallBitVec;
let mut v = SmallBitVec::new();
v.push(true);
v.push(false);
assert_eq!(v[0], true);
assert_eq!(v[1], false);
Macros§
- sbvec
- Creates a
SmallBitVec
containing the arguments.
Structs§
- Into
Iter - An iterator that owns a SmallBitVec and yields its bits as
bool
values. - Iter
- An iterator that borrows a SmallBitVec and yields its bits as
bool
values. - Small
BitVec - A resizable bit vector, optimized for size and inline storage.
- VecRange
- An immutable view of a range of bits from a borrowed SmallBitVec.
Enums§
- Internal
Storage - A typed representation of a
SmallBitVec
’s internal storage.