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

Method as_deref

ctutils/src/ct_option.rs:99–104  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

97 #[inline]
98 #[must_use]
99 pub fn as_deref(&self) -> CtOption<&T::Target>
100 where
101 T: Deref,
102 {
103 self.as_ref().map(Deref::deref)
104 }
105
106 /// Convert from `CtOption<T>` (or `&mut CtOption<T>`) to `CtOption<&mut T::Target>`, for types
107 /// which impl the [`DerefMut`] trait.

Callers 2

checkctFunction · 0.80
checkctFunction · 0.80

Calls 2

mapMethod · 0.80
as_refMethod · 0.45

Tested by

no test coverage detected