isErrAnd method

bool isErrAnd(
  1. bool predicate(
    1. E error
    )
)

Check if Result is Err and the error satisfies a predicate.

Implementation

bool isErrAnd(bool Function(E error) predicate) {
  if (this is Err<T, E>) {
    final error = (this as Err<T, E>).error;
    return predicate(error);
  }
  return false;
}