isErrAnd method
Whether the result failed and its error satisfies predicate.
predicate is not called for an Ok.
final retry = const Err<int, int>(503).isErrAnd((status) => status >= 500);
Implementation
bool isErrAnd(bool Function(E error) predicate) {
return switch (this) {
Ok<T, E>() => false,
Err<T, E>(:final error) => predicate(error),
};
}