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

Method into_option

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

Source from the content-addressed store, hash-verified

197 /// </div>
198 #[inline]
199 pub fn into_option(self) -> Option<T> {
200 if self.is_some.to_bool() {
201 Some(self.value)
202 } else {
203 None
204 }
205 }
206
207 /// Convert the [`CtOption`] wrapper into an [`Option`] in a `const fn`-friendly manner.
208 ///

Callers 2

ok_orMethod · 0.80
fromMethod · 0.80

Calls 1

to_boolMethod · 0.80

Tested by

no test coverage detected