ensure method
Ensures that a success value satisfies a condition, otherwise converts it to a failure.
Implementation
Res<S, F> ensure({
required bool Function(S ok) check,
required F Function(S ok) otherwise,
}) => Res._(_result.ensure(check: check, otherwise: otherwise));