INNER CODE UNIT · Rust
and
fishfolk/bones · framework_crates/bones_asset/src/lib.rs:151
pub fn and<U>(self, optb: Maybe<U>) -> Maybe<U> {
self.option().and(optb.option()).into()
}
/// Returns `Unset` if the option is `Unset`, otherwise calls `predicate` with the wrapped value and returns:
#[inline]
pub fn filter<P: FnOnce(&T) -> bool>(self, predicate: P) -> Maybe<T> {
self.option().filter(predicate).into()
}
/// Returns the option if it contains a value, otherwise returns `optb`.
#[inline]
pub fn or(self, optb: Maybe<T>) -> Maybe<T> {
self.option().or(optb.option()).into()
}
/// Returns the option if it contains a value, otherwise calls `f` and returns the result.
#[inline]