#[repr(transparent)]pub struct Boolean(pub u8);Expand description
ABI-compatible UEFI boolean.
This is similar to a bool, but allows values other than 0 or 1 to be
stored without it being undefined behavior.
Any non-zero value is treated as logical true. The comparison, ordering,
and hashing implementations follow that logical interpretation, so all
non-zero values compare equal and hash the same way. The original byte is
still preserved in the public field; compare the .0 values directly when
the exact raw bit pattern matters.
Tuple Fields§
§0: u8Implementations§
Trait Implementations§
impl Copy for Boolean
impl Eq for Boolean
Source§impl Ord for Boolean
impl Ord for Boolean
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Auto Trait Implementations§
impl Freeze for Boolean
impl RefUnwindSafe for Boolean
impl Send for Boolean
impl Sync for Boolean
impl Unpin for Boolean
impl UnsafeUnpin for Boolean
impl UnwindSafe for Boolean
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more