Struct rend::unaligned::NonZeroI32_ube
source · #[repr(C, packed(1))]pub struct NonZeroI32_ube(/* private fields */);
Expand description
A big-endian unaligned NonZeroI32
with a guaranteed size of 2
and alignment of 1
.
Implementations§
source§impl NonZeroI32_ube
impl NonZeroI32_ube
sourcepub const fn new(value: i32) -> Option<Self>
pub const fn new(value: i32) -> Option<Self>
Creates a non-zero if the given value is not zero.
sourcepub const unsafe fn new_unchecked(value: i32) -> Self
pub const unsafe fn new_unchecked(value: i32) -> Self
Creates a non-zero without checking whether it is non-zero. This results in undefined behavior if the value is zero.
§Safety
The value must not be zero.
sourcepub const fn from_native(value: NonZeroI32) -> Self
pub const fn from_native(value: NonZeroI32) -> Self
Returns a NonZeroI32_ube
containing value
.
sourcepub const fn to_native(self) -> NonZeroI32
pub const fn to_native(self) -> NonZeroI32
Returns a NonZeroI32
with the same value as self
.
Trait Implementations§
source§impl Binary for NonZeroI32_ube
impl Binary for NonZeroI32_ube
source§impl BitOr<&NonZeroI32_ube> for &NonZeroI32_ube
impl BitOr<&NonZeroI32_ube> for &NonZeroI32_ube
source§impl BitOr<&NonZeroI32_ube> for NonZeroI32
impl BitOr<&NonZeroI32_ube> for NonZeroI32
source§impl BitOr<&NonZeroI32_ube> for NonZeroI32_ube
impl BitOr<&NonZeroI32_ube> for NonZeroI32_ube
source§impl BitOr<NonZeroI32_ube> for &NonZeroI32_ube
impl BitOr<NonZeroI32_ube> for &NonZeroI32_ube
source§impl BitOr<NonZeroI32_ube> for NonZeroI32
impl BitOr<NonZeroI32_ube> for NonZeroI32
source§impl BitOr for NonZeroI32_ube
impl BitOr for NonZeroI32_ube
source§impl BitOrAssign<NonZero<i32>> for NonZeroI32_ube
impl BitOrAssign<NonZero<i32>> for NonZeroI32_ube
source§fn bitor_assign(&mut self, other: NonZeroI32)
fn bitor_assign(&mut self, other: NonZeroI32)
Performs the
|=
operation. Read moresource§impl BitOrAssign for NonZeroI32_ube
impl BitOrAssign for NonZeroI32_ube
source§fn bitor_assign(&mut self, other: NonZeroI32_ube)
fn bitor_assign(&mut self, other: NonZeroI32_ube)
Performs the
|=
operation. Read moresource§impl Clone for NonZeroI32_ube
impl Clone for NonZeroI32_ube
source§impl Debug for NonZeroI32_ube
impl Debug for NonZeroI32_ube
source§impl Display for NonZeroI32_ube
impl Display for NonZeroI32_ube
source§impl<'a> From<&'a NonZero<i32>> for NonZeroI32_ube
impl<'a> From<&'a NonZero<i32>> for NonZeroI32_ube
source§fn from(value: &'a NonZeroI32) -> Self
fn from(value: &'a NonZeroI32) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a NonZeroI32_ube> for NonZeroI32
impl<'a> From<&'a NonZeroI32_ube> for NonZeroI32
source§fn from(value: &'a NonZeroI32_ube) -> Self
fn from(value: &'a NonZeroI32_ube) -> Self
Converts to this type from the input type.
source§impl From<NonZero<i32>> for NonZeroI32_ube
impl From<NonZero<i32>> for NonZeroI32_ube
source§fn from(value: NonZeroI32) -> Self
fn from(value: NonZeroI32) -> Self
Converts to this type from the input type.
source§impl From<NonZeroI32_ube> for NonZeroI32
impl From<NonZeroI32_ube> for NonZeroI32
source§fn from(value: NonZeroI32_ube) -> Self
fn from(value: NonZeroI32_ube) -> Self
Converts to this type from the input type.
source§impl Hash for NonZeroI32_ube
impl Hash for NonZeroI32_ube
source§impl LowerHex for NonZeroI32_ube
impl LowerHex for NonZeroI32_ube
source§impl Octal for NonZeroI32_ube
impl Octal for NonZeroI32_ube
source§impl Ord for NonZeroI32_ube
impl Ord for NonZeroI32_ube
source§impl PartialEq<NonZero<i32>> for NonZeroI32_ube
impl PartialEq<NonZero<i32>> for NonZeroI32_ube
source§fn eq(&self, other: &NonZeroI32) -> bool
fn eq(&self, other: &NonZeroI32) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<NonZeroI32_ube> for NonZeroI32
impl PartialEq<NonZeroI32_ube> for NonZeroI32
source§fn eq(&self, other: &NonZeroI32_ube) -> bool
fn eq(&self, other: &NonZeroI32_ube) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq for NonZeroI32_ube
impl PartialEq for NonZeroI32_ube
source§impl PartialOrd<NonZero<i32>> for NonZeroI32_ube
impl PartialOrd<NonZero<i32>> for NonZeroI32_ube
source§fn partial_cmp(&self, other: &NonZeroI32) -> Option<Ordering>
fn partial_cmp(&self, other: &NonZeroI32) -> 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 PartialOrd for NonZeroI32_ube
impl PartialOrd for NonZeroI32_ube
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 UpperHex for NonZeroI32_ube
impl UpperHex for NonZeroI32_ube
impl Copy for NonZeroI32_ube
impl Eq for NonZeroI32_ube
Auto Trait Implementations§
impl Freeze for NonZeroI32_ube
impl RefUnwindSafe for NonZeroI32_ube
impl Send for NonZeroI32_ube
impl Sync for NonZeroI32_ube
impl Unpin for NonZeroI32_ube
impl UnwindSafe for NonZeroI32_ube
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)