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

Method expect_ref

ctutils/src/ct_option.rs:160–163  ·  view source on GitHub ↗
(&self, msg: &str)

Source from the content-addressed store, hash-verified

158 #[must_use]
159 #[track_caller]
160 pub const fn expect_ref(&self, msg: &str) -> &T {
161 assert!(self.is_some.to_bool(), "{}", msg);
162 self.as_inner_unchecked()
163 }
164
165 /// Inserts `value` into the [`CtOption`], then returns a mutable reference to it.
166 ///

Callers 1

expect_copiedMethod · 0.80

Calls 1

as_inner_uncheckedMethod · 0.80

Tested by

no test coverage detected