Module proptest::sample[][src]

Strategies for generating values by taking samples of collections.

Note that the strategies in this module are not native combinators; that is, the input collection is not itself a strategy, but is rather fixed when the strategy is created.

Re-exports

pub use collection::SizeRange;
pub use collection::size_range;

Structs

Select

Strategy to produce one value from a fixed collection of options.

SelectValueTree

ValueTree corresponding to Select.

Subsequence

Strategy to generate Vecs by sampling a subsequence from another collection.

SubsequenceValueTree

ValueTree type for Subsequence.

Functions

select

Create a strategy which uniformly selects one value from values.

subsequence

Sample subsequences whose size are within size from the given collection values.