#[repr(C)]pub struct Boolean(_);Expand description
Boolean Type
This boolean type works very similar to the rust primitive type of bool. However, the rust
primitive type has no stable ABI, hence we provide this type to represent booleans on the FFI
interface.
UEFI defines booleans to be 1-byte integers, which can only have the values of 0 or 1.
However, in practice anything non-zero is considered true by nearly all UEFI systems. Hence,
this type implements a boolean over u8 and maps 0 to false, everything else to true.
The binary representation of this type is ABI. That is, you are allowed to transmute from and
to u8. Furthermore, this type never modifies its binary representation. If it was
initialized as, or transmuted from, a specific integer value, this value will be retained.
However, on the rust side you will never see the integer value. It instead behaves truly as a
boolean. If you need access to the integer value, you have to transmute it back to u8.
Implementations
Trait Implementations
sourceimpl PartialEq<Boolean> for Boolean
impl PartialEq<Boolean> for Boolean
sourceimpl PartialEq<bool> for Boolean
impl PartialEq<bool> for Boolean
impl Copy for Boolean
impl Eq for Boolean
impl StructuralEq for Boolean
Auto Trait Implementations
impl RefUnwindSafe for Boolean
impl Send for Boolean
impl Sync for Boolean
impl Unpin for Boolean
impl UnwindSafe for Boolean
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more