Trait proptest::bits::BitSetLike
[−]
[src]
pub trait BitSetLike: Clone + Debug { fn new_bitset(max: usize) -> Self; fn max(&self) -> usize; fn test(&self, ix: usize) -> bool; fn set(&mut self, ix: usize); fn clear(&mut self, ix: usize); }
Trait for types which can be handled with BitSetStrategy
.
Required Methods
fn new_bitset(max: usize) -> Self
Create a new value of Self
with space for up to max
bits, all
initialised to zero.
fn max(&self) -> usize
Return an upper bound on the greatest bit set.
fn test(&self, ix: usize) -> bool
Test whether the given bit is set.
fn set(&mut self, ix: usize)
Set the given bit.
fn clear(&mut self, ix: usize)
Clear the given bit.