Expand description
Provides higher order Arbitrary traits.
This is mainly for use by proptest_derive.
§Stability note
This trait is mainly defined for proptest_derive to simplify the
mechanics of deriving recursive types. If you have custom containers
and want to support recursive for those, it is a good idea to implement
this trait.
There are clearer and terser ways that work better with
inference such as using proptest::collection::vec(..)
to achieve the same result.
For these reasons, the traits here are deliberately not exported in a convenient way.
Traits§
- Arbitrary
F1 ArbitraryF1lets you lift aStrategyto unary type constructors such asBox,Vec, andOption.- Arbitrary
F2 ArbitraryF2lets you liftStrategyto binary type constructors such asResult,HashMap.