pub struct U200 { /* private fields */ }
Expand description
200-bit unsigned integer represented as little-endian byte order.
use un_prim::*;
let x: U200 = 100u8.into();
assert_eq!(100u8, x.into());
Implementations§
Source§impl U200
impl U200
Sourcepub fn to_str_radix(&self, radix: u32) -> String
pub fn to_str_radix(&self, radix: u32) -> String
convert this type into radix string.
Source§impl U200
impl U200
Sourcepub fn from_le_bytes(bytes: [u8; 25]) -> Self
pub fn from_le_bytes(bytes: [u8; 25]) -> Self
Create this type from little endian bytes.
Sourcepub fn from_be_bytes(bytes: [u8; 25]) -> Self
pub fn from_be_bytes(bytes: [u8; 25]) -> Self
Create this type from big endian bytes.
Sourcepub fn to_le_bytes(&self) -> [u8; 25]
pub fn to_le_bytes(&self) -> [u8; 25]
Return the little endian representation of this type.
Sourcepub fn to_be_bytes(&self) -> [u8; 25]
pub fn to_be_bytes(&self) -> [u8; 25]
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§
Source§impl AddAssign for U200
impl AddAssign for U200
Source§fn add_assign(&mut self, other: U200)
fn add_assign(&mut self, other: U200)
+=
operation. Read moreSource§impl BitAndAssign for U200
impl BitAndAssign for U200
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&=
operation. Read moreSource§impl BitOrAssign for U200
impl BitOrAssign for U200
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|=
operation. Read moreSource§impl BitXorAssign for U200
impl BitXorAssign for U200
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^=
operation. Read moreSource§impl<'de> Deserialize<'de> for U200
impl<'de> Deserialize<'de> for U200
Source§fn 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>,
Source§impl DivAssign for U200
impl DivAssign for U200
Source§fn div_assign(&mut self, other: U200)
fn div_assign(&mut self, other: U200)
/=
operation. Read moreSource§impl MulAssign for U200
impl MulAssign for U200
Source§fn mul_assign(&mut self, other: U200)
fn mul_assign(&mut self, other: U200)
*=
operation. Read moreSource§impl Ord for U200
impl Ord for U200
Source§impl PartialOrd for U200
impl PartialOrd for U200
Source§impl RemAssign for U200
impl RemAssign for U200
Source§fn rem_assign(&mut self, other: U200)
fn rem_assign(&mut self, other: U200)
%=
operation. Read moreSource§impl ShlAssign<u32> for U200
impl ShlAssign<u32> for U200
Source§fn shl_assign(&mut self, n: u32)
fn shl_assign(&mut self, n: u32)
<<=
operation. Read moreSource§impl ShrAssign<u32> for U200
impl ShrAssign<u32> for U200
Source§fn shr_assign(&mut self, n: u32)
fn shr_assign(&mut self, n: u32)
>>=
operation. Read moreSource§impl SubAssign for U200
impl SubAssign for U200
Source§fn sub_assign(&mut self, other: U200)
fn sub_assign(&mut self, other: U200)
-=
operation. Read more