pub struct LeI16(/* private fields */);Expand description
16-bit signed little-endian integer. Alignment 1.
Implementations§
Source§impl LeI16
impl LeI16
Sourcepub const fn to_le_bytes(self) -> [u8; 2]
pub const fn to_le_bytes(self) -> [u8; 2]
Raw little-endian bytes.
Sourcepub const fn from_le_bytes(bytes: [u8; 2]) -> Self
pub const fn from_le_bytes(bytes: [u8; 2]) -> Self
Construct from raw little-endian bytes.
Sourcepub const fn checked_add(self, rhs: Self) -> Option<Self>
pub const fn checked_add(self, rhs: Self) -> Option<Self>
Checked addition.
Sourcepub const fn checked_sub(self, rhs: Self) -> Option<Self>
pub const fn checked_sub(self, rhs: Self) -> Option<Self>
Checked subtraction.
Sourcepub const fn checked_mul(self, rhs: Self) -> Option<Self>
pub const fn checked_mul(self, rhs: Self) -> Option<Self>
Checked multiplication.
Sourcepub const fn checked_div(self, rhs: Self) -> Option<Self>
pub const fn checked_div(self, rhs: Self) -> Option<Self>
Checked division.
Sourcepub const fn saturating_add(self, rhs: Self) -> Self
pub const fn saturating_add(self, rhs: Self) -> Self
Saturating addition.
Sourcepub const fn saturating_sub(self, rhs: Self) -> Self
pub const fn saturating_sub(self, rhs: Self) -> Self
Saturating subtraction.
Sourcepub const fn is_negative(self) -> bool
pub const fn is_negative(self) -> bool
Whether the value is negative.
Trait Implementations§
Source§impl AddAssign<i16> for LeI16
impl AddAssign<i16> for LeI16
Source§fn add_assign(&mut self, rhs: i16)
fn add_assign(&mut self, rhs: i16)
Performs the
+= operation. Read moreSource§impl AddAssign for LeI16
impl AddAssign for LeI16
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl DivAssign<i16> for LeI16
impl DivAssign<i16> for LeI16
Source§fn div_assign(&mut self, rhs: i16)
fn div_assign(&mut self, rhs: i16)
Performs the
/= operation. Read moreSource§impl DivAssign for LeI16
impl DivAssign for LeI16
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moreSource§impl MulAssign<i16> for LeI16
impl MulAssign<i16> for LeI16
Source§fn mul_assign(&mut self, rhs: i16)
fn mul_assign(&mut self, rhs: i16)
Performs the
*= operation. Read moreSource§impl MulAssign for LeI16
impl MulAssign for LeI16
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl Ord for LeI16
impl Ord for LeI16
Source§impl PartialOrd<i16> for LeI16
impl PartialOrd<i16> for LeI16
Source§impl PartialOrd for LeI16
impl PartialOrd for LeI16
Source§impl RemAssign<i16> for LeI16
impl RemAssign<i16> for LeI16
Source§fn rem_assign(&mut self, rhs: i16)
fn rem_assign(&mut self, rhs: i16)
Performs the
%= operation. Read moreSource§impl RemAssign for LeI16
impl RemAssign for LeI16
Source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Performs the
%= operation. Read moreSource§impl SubAssign<i16> for LeI16
impl SubAssign<i16> for LeI16
Source§fn sub_assign(&mut self, rhs: i16)
fn sub_assign(&mut self, rhs: i16)
Performs the
-= operation. Read moreSource§impl SubAssign for LeI16
impl SubAssign for LeI16
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for LeI16
impl Eq for LeI16
impl Projectable for LeI16
impl StructuralPartialEq for LeI16
Auto Trait Implementations§
impl Freeze for LeI16
impl RefUnwindSafe for LeI16
impl Send for LeI16
impl Sync for LeI16
impl Unpin for LeI16
impl UnsafeUnpin for LeI16
impl UnwindSafe for LeI16
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