(mut self, predicate: P)
| 299 | #[inline] |
| 300 | #[must_use] |
| 301 | pub fn filter<P>(mut self, predicate: P) -> Self |
| 302 | where |
| 303 | P: FnOnce(&T) -> Choice, |
| 304 | { |
| 305 | self.is_some &= predicate(&self.value); |
| 306 | self |
| 307 | } |
| 308 | |
| 309 | /// Apply an additional [`Choice`] requirement to `is_some`. |
| 310 | #[inline] |
no outgoing calls