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