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

Method filter

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

Source from the content-addressed store, hash-verified

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]

Callers 2

encode_blobsFunction · 0.80
filterFunction · 0.80

Calls

no outgoing calls

Tested by 1

filterFunction · 0.64