Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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_option
Method · 0.80
into_option_copied
Method · 0.80
select_vartime
Function · 0.80
to_bool_vartime
Method · 0.80
from
Method · 0.80
Calls
1
to_u8
Method · 0.80
Tested by
no test coverage detected