IdSet is a bitset implementation that stores data on the stack for small sizes (elements
less than 196) and keeps track of the element count.
The API is generally similar to that of the bit-set crate.
let mut set = IdSet::new(); set.insert(42); assert!(set.contains(42)); set.remove(42); assert_eq!(set.len(), 0);
IdIter struct provides iteration over the bits of any iterator over
values, allowing iteration over unions, intersections, and differences of arbitrarily many sets.
let a: IdSet = (0..15).collect(); let b: IdSet = (10..20).collect(); let c: IdSet = (0..5).collect(); assert_eq!(a.intersection(b.union(&c)).collect::<Vec<_>>(), a.intersection(&b).union(a.intersection(&c)).collect::<Vec<_>>());
Represents a view into the blocks of a set or combination of sets. An iterator over the elements
can be obtained with
An iterator over the blocks of the underlying representation.
Takes the difference of two block iterators.
Transforms an iterator over blocks into an iterator over elements.
A set of
Takes the intersection of two block iterators.
A consuming iterator over the blocks of the underlying representation.
A consuming iterator over all elements in increasing order.
An iterator over all elements in increasing order.
Takes the symmetric difference of two block iterators.
Takes the union of two block iterators.
The number of bits in the block type.
Conversion into an iterator over blocks.
The block type of the underlying representation.
The element type of the set.