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

Method unwrap_or_default

ctutils/src/ct_option.rs:466–471  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

464 #[inline]
465 #[must_use]
466 pub fn unwrap_or_default(self) -> T
467 where
468 T: CtSelect + Default,
469 {
470 self.unwrap_or(T::default())
471 }
472
473 /// Returns an "is some" [`CtOption`] with the contained value from either `self` or `optb` in
474 /// the event exactly one of them has `self.is_some()` set to [`Choice::TRUE`], or else returns

Callers

nothing calls this directly

Calls 2

defaultFunction · 0.85
unwrap_orMethod · 0.80

Tested by

no test coverage detected