isSomeAnd method
Returns whether or not this Option
holds a value (Some) and the held
value matches the given predicate.
Returns:
true
if thisOption
is Some andpredicate
returnstrue
.false
if thisOption
is None, orpredicate
returnsfalse
See also:
Rust: Option::is_some_and()
Implementation
bool isSomeAnd(bool Function(T) predicate) => switch (this) {
Some(:T v) => predicate(v),
None() => false
};