zebra_test::prelude::prop

Module sample

Expand description

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.

Structs§

  • A stand-in for an index into a slice or similar collection or conceptually similar things.
  • Strategy to create Indexes.
  • ValueTree corresponding to IndexStrategy.
  • Strategy to produce one value from a fixed collection of options.
  • ValueTree corresponding to Select.
  • A value for picking random values out of iterators.
  • Strategy to create Selectors.
  • ValueTree corresponding to SelectorStrategy.
  • The minimum and maximum range/bounds on the size of a collection. The interval must form a subset of [0, std::usize::MAX).
  • Strategy to generate Vecs by sampling a subsequence from another collection.
  • ValueTree type for Subsequence.

Functions§

  • Create a strategy which uniformly selects one value from values.
  • Creates a SizeRange from some value that is convertible into it.
  • Sample subsequences whose size are within size from the given collection values.