RandomVariant
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 generting every variant quickly can grow to unmanageable testing sets
Example
use Serialize;
use IpAddr;
let mut rng = cratethread_rng;
/// This allows us to limit the testing set to trying 100 randomized structs
for _i in 0..100