#[repr(u8)]pub enum Bool {
False = 0,
True = 1,
}Expand description
Boolean type that has portable binary representation.
Variants§
Trait Implementations§
Source§impl BitAndAssign for Bool
impl BitAndAssign for Bool
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the
&= operation. Read moreSource§impl BitOrAssign for Bool
impl BitOrAssign for Bool
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the
|= operation. Read moreSource§impl BitXorAssign for Bool
impl BitXorAssign for Bool
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the
^= operation. Read moreimpl Copy for Bool
impl Eq for Bool
impl Flat for Bool
Source§impl FlatValidate for Bool
impl FlatValidate for Bool
unsafe fn validate_unchecked(bytes: &[u8]) -> Result<(), Error>
unsafe fn validate_ptr(this: *const Self) -> Result<(), Error>
Source§fn validate(bytes: &[u8]) -> Result<(), Error>
fn validate(bytes: &[u8]) -> Result<(), Error>
Check that memory contents of
this is valid for Self.fn from_bytes(bytes: &[u8]) -> Result<&Self, Error>
fn from_mut_bytes(bytes: &mut [u8]) -> Result<&mut Self, Error>
Source§impl NativeCast for Bool
impl NativeCast for Bool
Source§impl Ord for Bool
impl Ord for Bool
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
Source§impl PartialOrd for Bool
impl PartialOrd for Bool
impl Portable for Bool
impl StructuralPartialEq for Bool
Auto Trait Implementations§
impl Freeze for Bool
impl RefUnwindSafe for Bool
impl Send for Bool
impl Sync for Bool
impl Unpin for Bool
impl UnsafeUnpin for Bool
impl UnwindSafe for Bool
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FlatDefault for T
impl<T> FlatDefault for T
type DefaultEmplacer = T
Source§fn default_emplacer() -> <T as FlatDefault>::DefaultEmplacer
fn default_emplacer() -> <T as FlatDefault>::DefaultEmplacer
Initialize uninitialized memory into valid default state. Read more
Source§impl<T> FlatUnsized for Twhere
T: FlatSized,
impl<T> FlatUnsized for Twhere
T: FlatSized,
unsafe fn ptr_from_bytes(bytes: *mut [u8]) -> *mut T
unsafe fn ptr_to_bytes(this: *mut T) -> *mut [u8]
unsafe fn from_bytes_unchecked(bytes: &[u8]) -> &Self
unsafe fn from_mut_bytes_unchecked(bytes: &mut [u8]) -> &mut Self
fn as_bytes(&self) -> &[u8] ⓘ
Source§fn new_in_place<I>(bytes: &mut [u8], emplacer: I) -> Result<&mut Self, Error>where
I: Emplacer<Self>,
fn new_in_place<I>(bytes: &mut [u8], emplacer: I) -> Result<&mut Self, Error>where
I: Emplacer<Self>,
Create a new instance of
Self initializing raw memory into default state of Self.