MCPcopy Create free account
hub / github.com/RustCrypto/utils / filter

Method filter

ctutils/src/ct_option.rs:301–307  ·  view source on GitHub ↗
(mut self, predicate: P)

Source from the content-addressed store, hash-verified

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]

Callers 2

encode_blobsFunction · 0.80
filterFunction · 0.80

Calls

no outgoing calls

Tested by 1

filterFunction · 0.64