std::collections::bit_set
Records
record BitSetDense 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): u64static init(): BitSetCompatibility alias for BitSet::new().
static new(): BitSetCreates an empty bit set.
static wordIndex(bit: u32): u64clear(&mut self): voidRemoves every bit from the set and releases the backing words.
contains(&self, bit: u32): booleanReturns whether bit is present in the set.
ensureWord(&mut self, wordIndex: u64): voidinsert(&mut self, bit: u32): voidAdds bit to the set.
lengthWords(&self): u64Returns the number of backing words currently allocated.
remove(&mut self, bit: u32): voidRemoves bit from the set when it is present.
Constants
const WORD_BITS: u64