[][src]Struct un_algebra::tests::config::prop::bits::BitSetStrategy

#[must_use = "strategies do nothing unless used"]
pub struct BitSetStrategy<T> where
    T: BitSetLike
{ /* fields omitted */ }

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.

Methods

impl<T> BitSetStrategy<T> where
    T: BitSetLike
[src]

pub fn new(min: usize, max: usize) -> BitSetStrategy<T>[src]

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.

pub fn masked(mask: T) -> BitSetStrategy<T>[src]

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

Trait Implementations

impl<T> Debug for BitSetStrategy<T> where
    T: BitSetLike + Debug
[src]

impl<T> Strategy for BitSetStrategy<T> where
    T: BitSetLike
[src]

type Tree = BitSetValueTree<T>

The value tree generated by this Strategy.

type Value = T

The type of value used by functions under test generated by this Strategy. Read more

impl<T> Copy for BitSetStrategy<T> where
    T: BitSetLike + Copy
[src]

impl<T> Clone for BitSetStrategy<T> where
    T: BitSetLike + Clone
[src]

Auto Trait Implementations

impl<T> Send for BitSetStrategy<T> where
    T: Send

impl<T> Sync for BitSetStrategy<T> where
    T: Sync

impl<T> Unpin for BitSetStrategy<T> where
    T: Unpin

impl<T> UnwindSafe for BitSetStrategy<T> where
    T: UnwindSafe

impl<T> RefUnwindSafe for BitSetStrategy<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = !

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,