[][src]Function un_algebra::tests::result::maybe_err

pub fn maybe_err<T, E>(t: T, e: E) -> MaybeErr<T, E> where
    E: Strategy,
    T: Strategy

Create a strategy for Results 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 Ok.