isSomeAnd method
Returns whether or not this Option holds a value (Some) and the held
value matches the given predicate.
Returns:
trueif thisOptionis Some andpredicatereturnstrue.falseif thisOptionis None, orpredicatereturnsfalse
See also:
Rust: Option::is_some_and()
Implementation
bool isSomeAnd(bool Function(T) predicate) => switch (this) {
Some(value: T value) => predicate(value),
None() => false
};