Struct rend::NonZeroU32_be
source · #[repr(C, align(4))]pub struct NonZeroU32_be(/* private fields */);
Expand description
A big-endian NonZeroU32
with a guaranteed size and alignment of 4
.
Implementations§
source§impl NonZeroU32_be
impl NonZeroU32_be
sourcepub const fn new(value: u32) -> Option<Self>
pub const fn new(value: u32) -> Option<Self>
Creates a non-zero if the given value is not zero.
sourcepub const unsafe fn new_unchecked(value: u32) -> Self
pub const unsafe fn new_unchecked(value: u32) -> 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: NonZeroU32) -> Self
pub const fn from_native(value: NonZeroU32) -> Self
Returns a NonZeroU32_be
containing value
.
sourcepub const fn to_native(self) -> NonZeroU32
pub const fn to_native(self) -> NonZeroU32
Returns a NonZeroU32
with the same value as self
.
Trait Implementations§
source§impl Binary for NonZeroU32_be
impl Binary for NonZeroU32_be
source§impl BitOr<&NonZeroU32_be> for &NonZeroU32_be
impl BitOr<&NonZeroU32_be> for &NonZeroU32_be
source§impl BitOr<&NonZeroU32_be> for NonZeroU32
impl BitOr<&NonZeroU32_be> for NonZeroU32
source§impl BitOr<&NonZeroU32_be> for NonZeroU32_be
impl BitOr<&NonZeroU32_be> for NonZeroU32_be
source§impl BitOr<NonZeroU32_be> for &NonZeroU32_be
impl BitOr<NonZeroU32_be> for &NonZeroU32_be
source§impl BitOr<NonZeroU32_be> for NonZeroU32
impl BitOr<NonZeroU32_be> for NonZeroU32
source§impl BitOr for NonZeroU32_be
impl BitOr for NonZeroU32_be
source§impl BitOrAssign<NonZero<u32>> for NonZeroU32_be
impl BitOrAssign<NonZero<u32>> for NonZeroU32_be
source§fn bitor_assign(&mut self, other: NonZeroU32)
fn bitor_assign(&mut self, other: NonZeroU32)
Performs the
|=
operation. Read moresource§impl BitOrAssign for NonZeroU32_be
impl BitOrAssign for NonZeroU32_be
source§fn bitor_assign(&mut self, other: NonZeroU32_be)
fn bitor_assign(&mut self, other: NonZeroU32_be)
Performs the
|=
operation. Read moresource§impl Clone for NonZeroU32_be
impl Clone for NonZeroU32_be
source§impl Debug for NonZeroU32_be
impl Debug for NonZeroU32_be
source§impl Display for NonZeroU32_be
impl Display for NonZeroU32_be
source§impl<'a> From<&'a NonZero<u32>> for NonZeroU32_be
impl<'a> From<&'a NonZero<u32>> for NonZeroU32_be
source§fn from(value: &'a NonZeroU32) -> Self
fn from(value: &'a NonZeroU32) -> Self
Converts to this type from the input type.
source§impl<'a> From<&'a NonZeroU32_be> for NonZeroU32
impl<'a> From<&'a NonZeroU32_be> for NonZeroU32
source§fn from(value: &'a NonZeroU32_be) -> Self
fn from(value: &'a NonZeroU32_be) -> Self
Converts to this type from the input type.
source§impl From<NonZero<u32>> for NonZeroU32_be
impl From<NonZero<u32>> for NonZeroU32_be
source§fn from(value: NonZeroU32) -> Self
fn from(value: NonZeroU32) -> Self
Converts to this type from the input type.
source§impl From<NonZeroU32_be> for NonZeroU32
impl From<NonZeroU32_be> for NonZeroU32
source§fn from(value: NonZeroU32_be) -> Self
fn from(value: NonZeroU32_be) -> Self
Converts to this type from the input type.
source§impl Hash for NonZeroU32_be
impl Hash for NonZeroU32_be
source§impl IntoBytes for NonZeroU32_be
impl IntoBytes for NonZeroU32_be
source§impl KnownLayout for NonZeroU32_bewhere
NonZeroU32: KnownLayout,
impl KnownLayout for NonZeroU32_bewhere
NonZeroU32: KnownLayout,
§type PointerMetadata = <NonZero<u32> as KnownLayout>::PointerMetadata
type PointerMetadata = <NonZero<u32> as KnownLayout>::PointerMetadata
The type of metadata stored in a pointer to
Self
. Read moresource§impl LowerHex for NonZeroU32_be
impl LowerHex for NonZeroU32_be
source§impl Octal for NonZeroU32_be
impl Octal for NonZeroU32_be
source§impl Ord for NonZeroU32_be
impl Ord for NonZeroU32_be
source§impl PartialEq<NonZero<u32>> for NonZeroU32_be
impl PartialEq<NonZero<u32>> for NonZeroU32_be
source§fn eq(&self, other: &NonZeroU32) -> bool
fn eq(&self, other: &NonZeroU32) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq<NonZeroU32_be> for NonZeroU32
impl PartialEq<NonZeroU32_be> for NonZeroU32
source§fn eq(&self, other: &NonZeroU32_be) -> bool
fn eq(&self, other: &NonZeroU32_be) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialEq for NonZeroU32_be
impl PartialEq for NonZeroU32_be
source§impl PartialOrd<NonZero<u32>> for NonZeroU32_be
impl PartialOrd<NonZero<u32>> for NonZeroU32_be
source§fn partial_cmp(&self, other: &NonZeroU32) -> Option<Ordering>
fn partial_cmp(&self, other: &NonZeroU32) -> 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 NonZeroU32_be
impl PartialOrd for NonZeroU32_be
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 TryFromBytes for NonZeroU32_bewhere
NonZeroU32: TryFromBytes,
impl TryFromBytes for NonZeroU32_bewhere
NonZeroU32: TryFromBytes,
§fn try_ref_from_bytes(
source: &[u8],
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
fn try_ref_from_bytes(
source: &[u8],
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
§fn try_ref_from_prefix(
source: &[u8],
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
fn try_ref_from_prefix(
source: &[u8],
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
§fn try_ref_from_suffix(
source: &[u8],
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
fn try_ref_from_suffix(
source: &[u8],
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout + Immutable,
§fn try_mut_from_bytes(
bytes: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout,
fn try_mut_from_bytes(
bytes: &mut [u8],
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout,
§fn try_mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout,
fn try_mut_from_prefix(
source: &mut [u8],
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout,
§fn try_mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout,
fn try_mut_from_suffix(
source: &mut [u8],
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout,
§fn try_read_from_bytes(
source: &[u8],
) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_bytes(
source: &[u8],
) -> Result<Self, ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
§fn try_read_from_prefix(
source: &[u8],
) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_prefix(
source: &[u8],
) -> Result<(Self, &[u8]), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
§fn try_read_from_suffix(
source: &[u8],
) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
fn try_read_from_suffix(
source: &[u8],
) -> Result<(&[u8], Self), ConvertError<Infallible, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: Sized,
source§impl UpperHex for NonZeroU32_be
impl UpperHex for NonZeroU32_be
impl Copy for NonZeroU32_be
impl Eq for NonZeroU32_be
impl Immutable for NonZeroU32_bewhere
NonZeroU32: Immutable,
Auto Trait Implementations§
impl Freeze for NonZeroU32_be
impl RefUnwindSafe for NonZeroU32_be
impl Send for NonZeroU32_be
impl Sync for NonZeroU32_be
impl Unpin for NonZeroU32_be
impl UnwindSafe for NonZeroU32_be
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
)