#[repr(C)]pub struct OptionalUsizeAbi {
pub present: u8,
pub reserved: [u8; 7],
pub value: usize,
}Expand description
Plain-data payload mirror of Option<usize>: same size and alignment
on every target, but every byte pattern is a valid value. Layout:
present at offset 0, reserved at offsets 1..size_of::<usize>()
(must be zero), value at offset size_of::<usize>(). present is
0 or 1; any other value, or a non-zero reserved, is rejected with
InvalidArgument.
Fields§
§present: u8§reserved: [u8; 7]§value: usizeTrait Implementations§
Source§impl Clone for OptionalUsizeAbi
impl Clone for OptionalUsizeAbi
Source§fn clone(&self) -> OptionalUsizeAbi
fn clone(&self) -> OptionalUsizeAbi
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OptionalUsizeAbi
impl Debug for OptionalUsizeAbi
Source§impl Default for OptionalUsizeAbi
impl Default for OptionalUsizeAbi
Source§fn default() -> OptionalUsizeAbi
fn default() -> OptionalUsizeAbi
Returns the “default value” for a type. Read more
Source§impl PartialEq for OptionalUsizeAbi
impl PartialEq for OptionalUsizeAbi
Source§fn eq(&self, other: &OptionalUsizeAbi) -> bool
fn eq(&self, other: &OptionalUsizeAbi) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for OptionalUsizeAbi
impl Eq for OptionalUsizeAbi
impl PlainData for OptionalUsizeAbi
impl StructuralPartialEq for OptionalUsizeAbi
Auto Trait Implementations§
impl Freeze for OptionalUsizeAbi
impl RefUnwindSafe for OptionalUsizeAbi
impl Send for OptionalUsizeAbi
impl Sync for OptionalUsizeAbi
impl Unpin for OptionalUsizeAbi
impl UnsafeUnpin for OptionalUsizeAbi
impl UnwindSafe for OptionalUsizeAbi
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