pub struct LeU32(/* private fields */);Expand description
32-bit unsigned little-endian integer. Alignment 1.
Implementations§
Source§impl LeU32
impl LeU32
Sourcepub const fn to_le_bytes(self) -> [u8; 4]
pub const fn to_le_bytes(self) -> [u8; 4]
Raw little-endian bytes.
Sourcepub const fn from_le_bytes(bytes: [u8; 4]) -> Self
pub const fn from_le_bytes(bytes: [u8; 4]) -> 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. Returns None on overflow.
Sourcepub const fn checked_sub(self, rhs: Self) -> Option<Self>
pub const fn checked_sub(self, rhs: Self) -> Option<Self>
Checked subtraction. Returns None on underflow.
Sourcepub const fn checked_mul(self, rhs: Self) -> Option<Self>
pub const fn checked_mul(self, rhs: Self) -> Option<Self>
Checked multiplication. Returns None on overflow.
Sourcepub const fn checked_div(self, rhs: Self) -> Option<Self>
pub const fn checked_div(self, rhs: Self) -> Option<Self>
Checked division. Returns None on divide-by-zero.
Sourcepub const fn saturating_add(self, rhs: Self) -> Self
pub const fn saturating_add(self, rhs: Self) -> Self
Saturating addition (clamps at MAX instead of wrapping).
Sourcepub const fn saturating_sub(self, rhs: Self) -> Self
pub const fn saturating_sub(self, rhs: Self) -> Self
Saturating subtraction (clamps at 0 instead of wrapping).
Sourcepub const fn wrapping_add(self, rhs: Self) -> Self
pub const fn wrapping_add(self, rhs: Self) -> Self
Wrapping addition (use explicitly when wrapping is intended).
Sourcepub const fn wrapping_sub(self, rhs: Self) -> Self
pub const fn wrapping_sub(self, rhs: Self) -> Self
Wrapping subtraction.
Trait Implementations§
Source§impl AddAssign<u32> for LeU32
impl AddAssign<u32> for LeU32
Source§fn add_assign(&mut self, rhs: u32)
fn add_assign(&mut self, rhs: u32)
Performs the
+= operation. Read moreSource§impl AddAssign for LeU32
impl AddAssign for LeU32
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl DivAssign<u32> for LeU32
impl DivAssign<u32> for LeU32
Source§fn div_assign(&mut self, rhs: u32)
fn div_assign(&mut self, rhs: u32)
Performs the
/= operation. Read moreSource§impl DivAssign for LeU32
impl DivAssign for LeU32
Source§fn div_assign(&mut self, rhs: Self)
fn div_assign(&mut self, rhs: Self)
Performs the
/= operation. Read moreSource§impl MulAssign<u32> for LeU32
impl MulAssign<u32> for LeU32
Source§fn mul_assign(&mut self, rhs: u32)
fn mul_assign(&mut self, rhs: u32)
Performs the
*= operation. Read moreSource§impl MulAssign for LeU32
impl MulAssign for LeU32
Source§fn mul_assign(&mut self, rhs: Self)
fn mul_assign(&mut self, rhs: Self)
Performs the
*= operation. Read moreSource§impl Ord for LeU32
impl Ord for LeU32
Source§impl PartialOrd<u32> for LeU32
impl PartialOrd<u32> for LeU32
Source§impl PartialOrd for LeU32
impl PartialOrd for LeU32
Source§impl RemAssign<u32> for LeU32
impl RemAssign<u32> for LeU32
Source§fn rem_assign(&mut self, rhs: u32)
fn rem_assign(&mut self, rhs: u32)
Performs the
%= operation. Read moreSource§impl RemAssign for LeU32
impl RemAssign for LeU32
Source§fn rem_assign(&mut self, rhs: Self)
fn rem_assign(&mut self, rhs: Self)
Performs the
%= operation. Read moreSource§impl SubAssign<u32> for LeU32
impl SubAssign<u32> for LeU32
Source§fn sub_assign(&mut self, rhs: u32)
fn sub_assign(&mut self, rhs: u32)
Performs the
-= operation. Read moreSource§impl SubAssign for LeU32
impl SubAssign for LeU32
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for LeU32
impl Eq for LeU32
impl Projectable for LeU32
impl StructuralPartialEq for LeU32
Auto Trait Implementations§
impl Freeze for LeU32
impl RefUnwindSafe for LeU32
impl Send for LeU32
impl Sync for LeU32
impl Unpin for LeU32
impl UnsafeUnpin for LeU32
impl UnwindSafe for LeU32
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