pub trait RandomVariant {
    fn random_variant<R: Rng>(rng: &mut R) -> Self;
}
Expand description

Trait that returns a random variant of the given type, if you are creating a new type to limit some values, instead of deriving the RandomVariant,

implement it manually to ensure only correct values are created Unless you also want to try the Result type

Useful for hunting down unwraps or other assumptions in your code, The benefit over the crate EveryVariant is that this can be limited to A much smaller set to test, where EveryVariant quickly can grow to unmanageable testing sets

Required Methods

Implementations on Foreign Types

Implementors