isErrAnd abstract method
Returns true
if the result is Err
and the value matches the predicate f
Examples
Result<int, String> y = Err('An unexpected error occured');
expect(x.isErrAnd((String value) => value.isNotEmpty), true);
expect(x.isErrAnd((String value) => value.isEmpty), false);
Result<int, String> x = Ok(0);
expect(x.isErrAnd((_) => true), false);
Implementation
bool isErrAnd(bool Function(E error) f);