Struct BitSetStrategy

struct BitSetStrategy<T: BitSetLike> { ... }

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) -> Self

Create a strategy which generates values where bits between min (inclusive) and max (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) -> Self

Create a strategy which generates values where any bits set (and only those bits) in mask may be set.

impl<T> Any for BitSetStrategy<T>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for BitSetStrategy<T>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for BitSetStrategy<T>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> CloneToUninit for BitSetStrategy<T>

unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)

impl<T> Freeze for BitSetStrategy<T>

impl<T> From for BitSetStrategy<T>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> RefUnwindSafe for BitSetStrategy<T>

impl<T> Send for BitSetStrategy<T>

impl<T> Sync for BitSetStrategy<T>

impl<T> ToOwned for BitSetStrategy<T>

fn to_owned(self: &Self) -> T
fn clone_into(self: &Self, target: &mut T)

impl<T> Unpin for BitSetStrategy<T>

impl<T> UnwindSafe for BitSetStrategy<T>

impl<T, U> Into for BitSetStrategy<T>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for BitSetStrategy<T>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for BitSetStrategy<T>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>

impl<T: $crate::clone::Clone + BitSetLike> Clone for BitSetStrategy<T>

fn clone(self: &Self) -> BitSetStrategy<T>

impl<T: $crate::fmt::Debug + BitSetLike> Debug for BitSetStrategy<T>

fn fmt(self: &Self, f: &mut $crate::fmt::Formatter<'_>) -> $crate::fmt::Result

impl<T: $crate::marker::Copy + BitSetLike> Copy for BitSetStrategy<T>

impl<T: BitSetLike> Strategy for BitSetStrategy<T>

fn new_tree(self: &Self, runner: &mut TestRunner) -> NewTree<Self>

impl<V, T> VZip for BitSetStrategy<T>

fn vzip(self: Self) -> V