isErrAnd method
Returns whether or not this Result is Err and that the held error value
matches the given predicate.
Returns:
trueif thisResultis Err andpredicatereturnstrue.falseif thisResultis Ok, orpredicatereturnsfalse
See also:
Rust: Result::is_err_and()
Implementation
bool isErrAnd(bool Function(E) predicate) {
return switch (this) {
Ok() => false,
Err(:E e) => predicate(e),
};
}