Trait proptest::bits::BitSetLike [−][src]
Trait for types which can be handled with BitSetStrategy.
Required methods
fn new_bitset(max: usize) -> Self[src]
Create a new value of Self with space for up to max bits, all
initialised to zero.
fn len(&self) -> usize[src]
Return an upper bound on the greatest bit set plus one.
fn test(&self, ix: usize) -> bool[src]
Test whether the given bit is set.
fn set(&mut self, ix: usize)[src]
Set the given bit.
fn clear(&mut self, ix: usize)[src]
Clear the given bit.
Provided methods
fn count(&self) -> usize[src]
Return the number of bits set.
This has a default for backwards compatibility, which simply does a linear scan through the bits. Implementations are strongly encouraged to override this.