#[repr(C, align(4))]pub struct NonZeroU32_le(/* private fields */);
Expand description
A little-endian NonZeroU32
with a guaranteed size and alignment of 4
.
Implementations§
Source§impl NonZeroU32_le
impl NonZeroU32_le
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_le
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_le
impl Binary for NonZeroU32_le
Source§impl BitOr<&NonZeroU32_le> for &NonZeroU32_le
impl BitOr<&NonZeroU32_le> for &NonZeroU32_le
Source§impl BitOr<&NonZeroU32_le> for NonZeroU32
impl BitOr<&NonZeroU32_le> for NonZeroU32
Source§impl BitOr<&NonZeroU32_le> for NonZeroU32_le
impl BitOr<&NonZeroU32_le> for NonZeroU32_le
Source§impl BitOr<NonZeroU32_le> for &NonZeroU32_le
impl BitOr<NonZeroU32_le> for &NonZeroU32_le
Source§impl BitOr<NonZeroU32_le> for NonZeroU32
impl BitOr<NonZeroU32_le> for NonZeroU32
Source§impl BitOr for NonZeroU32_le
impl BitOr for NonZeroU32_le
Source§impl BitOrAssign<NonZero<u32>> for NonZeroU32_le
impl BitOrAssign<NonZero<u32>> for NonZeroU32_le
Source§fn bitor_assign(&mut self, other: NonZeroU32)
fn bitor_assign(&mut self, other: NonZeroU32)
Performs the
|=
operation. Read moreSource§impl BitOrAssign for NonZeroU32_le
impl BitOrAssign for NonZeroU32_le
Source§fn bitor_assign(&mut self, other: NonZeroU32_le)
fn bitor_assign(&mut self, other: NonZeroU32_le)
Performs the
|=
operation. Read moreSource§impl Clone for NonZeroU32_le
impl Clone for NonZeroU32_le
Source§impl Debug for NonZeroU32_le
impl Debug for NonZeroU32_le
Source§impl Display for NonZeroU32_le
impl Display for NonZeroU32_le
Source§impl<'a> From<&'a NonZero<u32>> for NonZeroU32_le
impl<'a> From<&'a NonZero<u32>> for NonZeroU32_le
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_le> for NonZeroU32
impl<'a> From<&'a NonZeroU32_le> for NonZeroU32
Source§fn from(value: &'a NonZeroU32_le) -> Self
fn from(value: &'a NonZeroU32_le) -> Self
Converts to this type from the input type.
Source§impl From<NonZero<u32>> for NonZeroU32_le
impl From<NonZero<u32>> for NonZeroU32_le
Source§fn from(value: NonZeroU32) -> Self
fn from(value: NonZeroU32) -> Self
Converts to this type from the input type.
Source§impl From<NonZeroU32_le> for NonZeroU32
impl From<NonZeroU32_le> for NonZeroU32
Source§fn from(value: NonZeroU32_le) -> Self
fn from(value: NonZeroU32_le) -> Self
Converts to this type from the input type.
Source§impl Hash for NonZeroU32_le
impl Hash for NonZeroU32_le
Source§impl IntoBytes for NonZeroU32_le
impl IntoBytes for NonZeroU32_le
Source§impl KnownLayout for NonZeroU32_lewhere
NonZeroU32: KnownLayout,
impl KnownLayout for NonZeroU32_lewhere
NonZeroU32: KnownLayout,
Source§impl LowerHex for NonZeroU32_le
impl LowerHex for NonZeroU32_le
Source§impl Octal for NonZeroU32_le
impl Octal for NonZeroU32_le
Source§impl Ord for NonZeroU32_le
impl Ord for NonZeroU32_le
Source§impl PartialEq<NonZeroU32_le> for NonZeroU32
impl PartialEq<NonZeroU32_le> for NonZeroU32
Source§impl PartialEq for NonZeroU32_le
impl PartialEq for NonZeroU32_le
Source§impl PartialOrd<NonZero<u32>> for NonZeroU32_le
impl PartialOrd<NonZero<u32>> for NonZeroU32_le
Source§impl PartialOrd for NonZeroU32_le
impl PartialOrd for NonZeroU32_le
Source§impl TryFromBytes for NonZeroU32_lewhere
NonZeroU32: TryFromBytes,
impl TryFromBytes for NonZeroU32_lewhere
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_ref_from_bytes_with_elems(
source: &[u8],
count: usize,
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout<PointerMetadata = usize> + Immutable,
fn try_ref_from_bytes_with_elems(
source: &[u8],
count: usize,
) -> Result<&Self, ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout<PointerMetadata = usize> + Immutable,
§fn try_ref_from_prefix_with_elems(
source: &[u8],
count: usize,
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout<PointerMetadata = usize> + Immutable,
fn try_ref_from_prefix_with_elems(
source: &[u8],
count: usize,
) -> Result<(&Self, &[u8]), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout<PointerMetadata = usize> + Immutable,
Attempts to interpret the prefix of the given
source
as a &Self
with
a DST length equal to count
. Read more§fn try_ref_from_suffix_with_elems(
source: &[u8],
count: usize,
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout<PointerMetadata = usize> + Immutable,
fn try_ref_from_suffix_with_elems(
source: &[u8],
count: usize,
) -> Result<(&[u8], &Self), ConvertError<AlignmentError<&[u8], Self>, SizeError<&[u8], Self>, ValidityError<&[u8], Self>>>where
Self: KnownLayout<PointerMetadata = usize> + Immutable,
Attempts to interpret the suffix of the given
source
as a &Self
with
a DST length equal to count
. Read more§fn try_mut_from_bytes_with_elems(
source: &mut [u8],
count: usize,
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout<PointerMetadata = usize>,
fn try_mut_from_bytes_with_elems(
source: &mut [u8],
count: usize,
) -> Result<&mut Self, ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout<PointerMetadata = usize>,
§fn try_mut_from_prefix_with_elems(
source: &mut [u8],
count: usize,
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout<PointerMetadata = usize>,
fn try_mut_from_prefix_with_elems(
source: &mut [u8],
count: usize,
) -> Result<(&mut Self, &mut [u8]), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout<PointerMetadata = usize>,
Attempts to interpret the prefix of the given
source
as a &mut Self
with a DST length equal to count
. Read more§fn try_mut_from_suffix_with_elems(
source: &mut [u8],
count: usize,
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout<PointerMetadata = usize>,
fn try_mut_from_suffix_with_elems(
source: &mut [u8],
count: usize,
) -> Result<(&mut [u8], &mut Self), ConvertError<AlignmentError<&mut [u8], Self>, SizeError<&mut [u8], Self>, ValidityError<&mut [u8], Self>>>where
Self: KnownLayout<PointerMetadata = usize>,
Attempts to interpret the suffix of the given
source
as a &mut Self
with a DST length equal to count
. Read more§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_le
impl UpperHex for NonZeroU32_le
impl Copy for NonZeroU32_le
impl Eq for NonZeroU32_le
impl Immutable for NonZeroU32_lewhere
NonZeroU32: Immutable,
Auto Trait Implementations§
impl Freeze for NonZeroU32_le
impl RefUnwindSafe for NonZeroU32_le
impl Send for NonZeroU32_le
impl Sync for NonZeroU32_le
impl Unpin for NonZeroU32_le
impl UnwindSafe for NonZeroU32_le
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§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
)