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

Method or

ctutils/src/ct_option.rs:395–403  ·  view source on GitHub ↗
(self, optb: CtOption<T>)

Source from the content-addressed store, hash-verified

393 #[inline]
394 #[must_use]
395 pub fn or(self, optb: CtOption<T>) -> CtOption<T>
396 where
397 T: CtSelect,
398 {
399 CtOption {
400 value: self.value.ct_select(&optb.value, self.is_none()),
401 is_some: self.is_some | optb.is_some,
402 }
403 }
404
405 /// Obtain a copy of the inner value without first checking that `self.is_some()` is
406 /// [`Choice::TRUE`].

Callers

nothing calls this directly

Calls 2

is_noneMethod · 0.80
ct_selectMethod · 0.45

Tested by

no test coverage detected