Module

std::collections::bit_set

Records

record BitSet

Dense deterministic set for u32 bit indexes.

BitSet stores membership in little-endian u64 words. It is intended for compiler-style dataflow and membership sets where ids are dense enough that a bit-vector is simpler than a hash table.

Members
words: Vector<u64>
static bitMask(bit: u32): u64
static init(): BitSet

Compatibility alias for BitSet::new().

static new(): BitSet

Creates an empty bit set.

static wordIndex(bit: u32): u64
clear(&mut self): void

Removes every bit from the set and releases the backing words.

contains(&self, bit: u32): boolean

Returns whether bit is present in the set.

ensureWord(&mut self, wordIndex: u64): void
insert(&mut self, bit: u32): void

Adds bit to the set.

lengthWords(&self): u64

Returns the number of backing words currently allocated.

remove(&mut self, bit: u32): void

Removes bit from the set when it is present.

Constants

const WORD_BITS: u64