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

Method to_bool

ctutils/src/choice.rs:416–418  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

414 /// </div>
415 #[must_use]
416 pub const fn to_bool(self) -> bool {
417 self.to_u8() != 0
418 }
419
420 /// Convert [`Choice`] to a `u8`, attempting to apply a "best effort" optimization barrier.
421 #[must_use]

Callers 5

into_optionMethod · 0.80
into_option_copiedMethod · 0.80
select_vartimeFunction · 0.80
to_bool_vartimeMethod · 0.80
fromMethod · 0.80

Calls 1

to_u8Method · 0.80

Tested by

no test coverage detected