isOkAnd method
Returns whether or not this Result
is Ok and that the held value matches
the given predicate.
Returns:
true
if thisResult
is Ok andpredicate
returnstrue
.false
if thisResult
is Err, orpredicate
returnsfalse
See also:
Rust: Result::is_ok_and()
Implementation
bool isOkAnd(bool Function(T) predicate) => switch (this) {
Ok(:T v) => predicate(v),
Err() => false
};