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

Method new

ctutils/src/ct_option.rs:53–55  ·  view source on GitHub ↗
(value: T, is_some: Choice)

Source from the content-addressed store, hash-verified

51 #[inline]
52 #[must_use]
53 pub const fn new(value: T, is_some: Choice) -> CtOption<T> {
54 Self { value, is_some }
55 }
56
57 /// Construct a new [`CtOption`] where `self.is_some()` is [`Choice::TRUE`].
58 #[inline]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected