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