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