#[repr(C, align(8))]pub struct NonZeroU64_be(/* private fields */);
Expand description
A big-endian NonZeroU64
with a guaranteed size and alignment of 8
.
Implementations§
Source§impl NonZeroU64_be
impl NonZeroU64_be
Sourcepub const fn new(value: u64) -> Option<Self>
pub const fn new(value: u64) -> Option<Self>
Creates a non-zero if the given value is not zero.
Sourcepub const unsafe fn new_unchecked(value: u64) -> Self
pub const unsafe fn new_unchecked(value: u64) -> 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: NonZeroU64) -> Self
pub const fn from_native(value: NonZeroU64) -> Self
Returns a NonZeroU64_be
containing value
.
Sourcepub const fn to_native(self) -> NonZeroU64
pub const fn to_native(self) -> NonZeroU64
Returns a NonZeroU64
with the same value as self
.
Trait Implementations§
Source§impl Binary for NonZeroU64_be
impl Binary for NonZeroU64_be
Source§impl BitOr<&NonZeroU64_be> for &NonZeroU64_be
impl BitOr<&NonZeroU64_be> for &NonZeroU64_be
Source§impl BitOr<&NonZeroU64_be> for NonZeroU64
impl BitOr<&NonZeroU64_be> for NonZeroU64
Source§impl BitOr<&NonZeroU64_be> for NonZeroU64_be
impl BitOr<&NonZeroU64_be> for NonZeroU64_be
Source§impl BitOr<NonZeroU64_be> for &NonZeroU64_be
impl BitOr<NonZeroU64_be> for &NonZeroU64_be
Source§impl BitOr<NonZeroU64_be> for NonZeroU64
impl BitOr<NonZeroU64_be> for NonZeroU64
Source§impl BitOr for NonZeroU64_be
impl BitOr for NonZeroU64_be
Source§impl BitOrAssign<NonZero<u64>> for NonZeroU64_be
impl BitOrAssign<NonZero<u64>> for NonZeroU64_be
Source§fn bitor_assign(&mut self, other: NonZeroU64)
fn bitor_assign(&mut self, other: NonZeroU64)
Performs the
|=
operation. Read moreSource§impl BitOrAssign for NonZeroU64_be
impl BitOrAssign for NonZeroU64_be
Source§fn bitor_assign(&mut self, other: NonZeroU64_be)
fn bitor_assign(&mut self, other: NonZeroU64_be)
Performs the
|=
operation. Read moreSource§impl Clone for NonZeroU64_be
impl Clone for NonZeroU64_be
Source§impl Debug for NonZeroU64_be
impl Debug for NonZeroU64_be
Source§impl Display for NonZeroU64_be
impl Display for NonZeroU64_be
Source§impl<'a> From<&'a NonZero<u64>> for NonZeroU64_be
impl<'a> From<&'a NonZero<u64>> for NonZeroU64_be
Source§fn from(value: &'a NonZeroU64) -> Self
fn from(value: &'a NonZeroU64) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a NonZeroU64_be> for NonZeroU64
impl<'a> From<&'a NonZeroU64_be> for NonZeroU64
Source§fn from(value: &'a NonZeroU64_be) -> Self
fn from(value: &'a NonZeroU64_be) -> Self
Converts to this type from the input type.
Source§impl From<NonZero<u64>> for NonZeroU64_be
impl From<NonZero<u64>> for NonZeroU64_be
Source§fn from(value: NonZeroU64) -> Self
fn from(value: NonZeroU64) -> Self
Converts to this type from the input type.
Source§impl From<NonZeroU64_be> for NonZeroU64
impl From<NonZeroU64_be> for NonZeroU64
Source§fn from(value: NonZeroU64_be) -> Self
fn from(value: NonZeroU64_be) -> Self
Converts to this type from the input type.
Source§impl Hash for NonZeroU64_be
impl Hash for NonZeroU64_be
Source§impl IntoBytes for NonZeroU64_be
impl IntoBytes for NonZeroU64_be
Source§impl KnownLayout for NonZeroU64_bewhere
NonZeroU64: KnownLayout,
impl KnownLayout for NonZeroU64_bewhere
NonZeroU64: KnownLayout,
Source§impl LowerHex for NonZeroU64_be
impl LowerHex for NonZeroU64_be
Source§impl Octal for NonZeroU64_be
impl Octal for NonZeroU64_be
Source§impl Ord for NonZeroU64_be
impl Ord for NonZeroU64_be
Source§impl PartialEq<NonZeroU64_be> for NonZeroU64
impl PartialEq<NonZeroU64_be> for NonZeroU64
Source§impl PartialEq for NonZeroU64_be
impl PartialEq for NonZeroU64_be
Source§impl PartialOrd<NonZero<u64>> for NonZeroU64_be
impl PartialOrd<NonZero<u64>> for NonZeroU64_be
Source§impl PartialOrd for NonZeroU64_be
impl PartialOrd for NonZeroU64_be
Source§impl TryFromBytes for NonZeroU64_bewhere
NonZeroU64: TryFromBytes,
impl TryFromBytes for NonZeroU64_bewhere
NonZeroU64: 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 NonZeroU64_be
impl UpperHex for NonZeroU64_be
impl Copy for NonZeroU64_be
impl Eq for NonZeroU64_be
impl Immutable for NonZeroU64_bewhere
NonZeroU64: Immutable,
Auto Trait Implementations§
impl Freeze for NonZeroU64_be
impl RefUnwindSafe for NonZeroU64_be
impl Send for NonZeroU64_be
impl Sync for NonZeroU64_be
impl Unpin for NonZeroU64_be
impl UnwindSafe for NonZeroU64_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§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
)