pub struct U72 { /* private fields */ }Expand description
72-bit unsigned integer represented as little-endian byte order.
use un_prim::*;
let x: U72 = 100u8.into();
assert_eq!(100u8, x.into());
Implementations
sourceimpl U72
impl U72
sourcepub fn to_str_radix(&self, radix: u32) -> String
pub fn to_str_radix(&self, radix: u32) -> String
convert this type into radix string.
sourceimpl U72
impl U72
sourcepub fn from_le_bytes(bytes: [u8; 9]) -> Self
pub fn from_le_bytes(bytes: [u8; 9]) -> Self
Create this type from little endian bytes.
sourcepub fn from_be_bytes(bytes: [u8; 9]) -> Self
pub fn from_be_bytes(bytes: [u8; 9]) -> Self
Create this type from big endian bytes.
sourcepub fn to_le_bytes(&self) -> [u8; 9]
pub fn to_le_bytes(&self) -> [u8; 9]
Return the little endian representation of this type.
sourcepub fn to_be_bytes(&self) -> [u8; 9]
pub fn to_be_bytes(&self) -> [u8; 9]
Return the big endian representation of this type.
sourcepub fn leading_zeros(&self) -> u32
pub fn leading_zeros(&self) -> u32
Return count of leading zeros.
sourcepub fn trailing_zeros(&self) -> u32
pub fn trailing_zeros(&self) -> u32
Return count of trailing zeros.
sourcepub fn leading_ones(&self) -> u32
pub fn leading_ones(&self) -> u32
Return count of leading ones.
sourcepub fn trailing_ones(&self) -> u32
pub fn trailing_ones(&self) -> u32
Return count of trailing ones.
sourcepub fn overflowing_add(&self, other: Self) -> (Self, bool)
pub fn overflowing_add(&self, other: Self) -> (Self, bool)
Add two number and return the sum along with the carry.
sourcepub fn overflowing_sub(&self, other: Self) -> (Self, bool)
pub fn overflowing_sub(&self, other: Self) -> (Self, bool)
Subtract two number and return the sum along with the borrow.
sourcepub fn overflowing_mul(&self, other: Self) -> (Self, bool)
pub fn overflowing_mul(&self, other: Self) -> (Self, bool)
Return product of two number after multiplication and bool indicating overflow.
sourcepub fn div_rem(&self, rhs: Self) -> (Self, Self)
pub fn div_rem(&self, rhs: Self) -> (Self, Self)
Divide two numbers and return tuple of the quotient and remainder.
sourcepub fn overflowing_shl(&self, n: u32) -> (Self, bool)
pub fn overflowing_shl(&self, n: u32) -> (Self, bool)
Shift left and return the result along with boolean indicating overflow.
sourcepub fn overflowing_shr(&self, n: u32) -> (Self, bool)
pub fn overflowing_shr(&self, n: u32) -> (Self, bool)
Shift right and return the result along with boolean indicating overflow.
Trait Implementations
sourceimpl AddAssign<U72> for U72
impl AddAssign<U72> for U72
sourcefn add_assign(&mut self, other: U72)
fn add_assign(&mut self, other: U72)
Performs the += operation. Read more
sourceimpl BitAndAssign<U72> for U72
impl BitAndAssign<U72> for U72
sourcefn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
Performs the &= operation. Read more
sourceimpl BitOrAssign<U72> for U72
impl BitOrAssign<U72> for U72
sourcefn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
Performs the |= operation. Read more
sourceimpl BitXorAssign<U72> for U72
impl BitXorAssign<U72> for U72
sourcefn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
Performs the ^= operation. Read more
sourceimpl<'de> Deserialize<'de> for U72
impl<'de> Deserialize<'de> for U72
sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl DivAssign<U72> for U72
impl DivAssign<U72> for U72
sourcefn div_assign(&mut self, other: U72)
fn div_assign(&mut self, other: U72)
Performs the /= operation. Read more
sourceimpl MulAssign<U72> for U72
impl MulAssign<U72> for U72
sourcefn mul_assign(&mut self, other: U72)
fn mul_assign(&mut self, other: U72)
Performs the *= operation. Read more
sourceimpl Ord for U72
impl Ord for U72
sourceimpl PartialEq<U72> for U72
impl PartialEq<U72> for U72
sourceimpl PartialOrd<U72> for U72
impl PartialOrd<U72> for U72
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
This method returns an ordering between self and other values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl RemAssign<U72> for U72
impl RemAssign<U72> for U72
sourcefn rem_assign(&mut self, other: U72)
fn rem_assign(&mut self, other: U72)
Performs the %= operation. Read more
sourceimpl ShlAssign<u32> for U72
impl ShlAssign<u32> for U72
sourcefn shl_assign(&mut self, n: u32)
fn shl_assign(&mut self, n: u32)
Performs the <<= operation. Read more
sourceimpl ShrAssign<u32> for U72
impl ShrAssign<u32> for U72
sourcefn shr_assign(&mut self, n: u32)
fn shr_assign(&mut self, n: u32)
Performs the >>= operation. Read more
sourceimpl SubAssign<U72> for U72
impl SubAssign<U72> for U72
sourcefn sub_assign(&mut self, other: U72)
fn sub_assign(&mut self, other: U72)
Performs the -= operation. Read more
impl Copy for U72
impl Eq for U72
Auto Trait Implementations
impl RefUnwindSafe for U72
impl Send for U72
impl Sync for U72
impl Unpin for U72
impl UnwindSafe for U72
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more