Enum platforms::target::PointerWidth
source · #[non_exhaustive]pub enum PointerWidth {
U16,
U32,
U64,
}
Expand description
target_pointer_width
: Size of native pointer types (usize
, isize
) in bits
64 bits for modern desktops and phones, 32-bits for older devices, 16 bits for certain microcontrollers
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Trait Implementations§
source§impl Clone for PointerWidth
impl Clone for PointerWidth
source§fn clone(&self) -> PointerWidth
fn clone(&self) -> PointerWidth
Returns a copy of the value. Read more
1.0.0 · 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 PointerWidth
impl Debug for PointerWidth
source§impl Display for PointerWidth
impl Display for PointerWidth
source§impl From<PointerWidth> for u8
impl From<PointerWidth> for u8
source§fn from(value: PointerWidth) -> Self
fn from(value: PointerWidth) -> Self
Converts to this type from the input type.
source§impl FromStr for PointerWidth
impl FromStr for PointerWidth
source§impl Hash for PointerWidth
impl Hash for PointerWidth
source§impl Ord for PointerWidth
impl Ord for PointerWidth
source§fn cmp(&self, other: &PointerWidth) -> Ordering
fn cmp(&self, other: &PointerWidth) -> Ordering
1.21.0 · 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 PartialEq for PointerWidth
impl PartialEq for PointerWidth
source§fn eq(&self, other: &PointerWidth) -> bool
fn eq(&self, other: &PointerWidth) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for PointerWidth
impl PartialOrd for PointerWidth
source§fn partial_cmp(&self, other: &PointerWidth) -> Option<Ordering>
fn partial_cmp(&self, other: &PointerWidth) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<u8> for PointerWidth
impl TryFrom<u8> for PointerWidth
impl Copy for PointerWidth
impl Eq for PointerWidth
impl StructuralPartialEq for PointerWidth
Auto Trait Implementations§
impl Freeze for PointerWidth
impl RefUnwindSafe for PointerWidth
impl Send for PointerWidth
impl Sync for PointerWidth
impl Unpin for PointerWidth
impl UnwindSafe for PointerWidth
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