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

Method and_then

ctutils/src/ct_option.rs:264–271  ·  view source on GitHub ↗
(self, f: F)

Source from the content-addressed store, hash-verified

262 #[inline]
263 #[must_use]
264 pub fn and_then<U, F>(self, f: F) -> CtOption<U>
265 where
266 F: FnOnce(T) -> CtOption<U>,
267 {
268 let mut ret = f(self.value);
269 ret.is_some &= self.is_some;
270 ret
271 }
272
273 /// Obtain a reference to the inner value without first checking that `self.is_some()` is
274 /// [`Choice::TRUE`].

Callers 1

and_thenFunction · 0.80

Calls

no outgoing calls

Tested by 1

and_thenFunction · 0.64