[−][src]Function proptest::result::maybe_ok
pub fn maybe_ok<T: Strategy, E: Strategy>(t: T, e: E) -> MaybeOk<T, E>
Create a strategy for Result
s where Ok
values are taken from t
and
Err
values are taken from e
.
Ok
and Err
are chosen with equal probability.
Generated values shrink to Err
.