Struct BitSetStrategy
#[must_use = "strategies do nothing unless used"]
pub struct BitSetStrategy<T: BitSetLike> { /* private fields */ }
Generates values as a set of bits between the two bounds.
Values are generated by uniformly setting individual bits to 0 or 1 between the bounds. Shrinking iteratively clears bits.
Implementations
impl<T: BitSetLike> BitSetStrategy<T>
fn new(min: usize, max: usize) -> SelfCreate a strategy which generates values where bits between
min(inclusive) andmax(exclusive) may be set.Due to the generics, the functions in the typed submodules are usually preferable to calling this directly.
fn masked(mask: T) -> SelfCreate a strategy which generates values where any bits set (and only those bits) in
maskmay be set.
Trait Implementations
impl<T: BitSetLike> Strategy for BitSetStrategy<T>
type Tree = BitSetValueTree<T>;type Value = T;fn new_tree(&self, runner: &mut TestRunner) -> NewTree<Self>
impl<T: Clone + BitSetLike> Clone for BitSetStrategy<T>
fn clone(&self) -> Self
impl<T: Copy + BitSetLike> Copy for BitSetStrategy<T>
impl<T: Debug + BitSetLike> Debug for BitSetStrategy<T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result