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