[][src]Struct proptest::bits::BitSetStrategy

#[must_use = "strategies do nothing unless used"]pub struct BitSetStrategy<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.

Implementations

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

pub fn new(min: usize, max: usize) -> Self[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) -> Self[src]

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

Trait Implementations

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

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

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

impl<T: BitSetLike> Strategy for BitSetStrategy<T>[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

Auto Trait Implementations

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

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

Blanket Implementations

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

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

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

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 = Infallible

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<V, T> VZip<V> for T where
    V: MultiLane<T>,