pub struct U256(/* private fields */);Implementations§
Source§impl U256
impl U256
pub const ZERO: Self
pub const ONE: Self
pub const MAX: Self
pub const fn from_u128(v: u128) -> Self
pub const fn from_u64(v: u64) -> Self
pub const fn lo(&self) -> u128
pub const fn hi(&self) -> u128
pub const fn is_zero(&self) -> bool
pub fn try_into_u128(&self) -> Option<u128>
pub fn checked_add(self, rhs: U256) -> Option<U256>
pub fn checked_sub(self, rhs: U256) -> Option<U256>
pub fn checked_mul(self, rhs: U256) -> Option<U256>
pub fn checked_div(self, rhs: U256) -> Option<U256>
pub fn checked_rem(self, rhs: U256) -> Option<U256>
pub fn overflowing_add(self, rhs: U256) -> (U256, bool)
pub fn overflowing_sub(self, rhs: U256) -> (U256, bool)
pub fn saturating_add(self, rhs: U256) -> U256
pub fn saturating_sub(self, rhs: U256) -> U256
pub fn shl(self, bits: u32) -> U256
pub fn shr(self, bits: u32) -> U256
pub fn bitand(self, rhs: U256) -> U256
pub fn bitor(self, rhs: U256) -> U256
Trait Implementations§
Source§impl AddAssign for U256
impl AddAssign for U256
Source§fn add_assign(&mut self, rhs: Self)
fn add_assign(&mut self, rhs: Self)
Performs the
+= operation. Read moreSource§impl Ord for U256
impl Ord for U256
Source§impl PartialOrd for U256
impl PartialOrd for U256
Source§impl SubAssign for U256
impl SubAssign for U256
Source§fn sub_assign(&mut self, rhs: Self)
fn sub_assign(&mut self, rhs: Self)
Performs the
-= operation. Read moreimpl Copy for U256
impl Eq for U256
impl StructuralPartialEq for U256
Auto Trait Implementations§
impl Freeze for U256
impl RefUnwindSafe for U256
impl Send for U256
impl Sync for U256
impl Unpin for U256
impl UnsafeUnpin for U256
impl UnwindSafe for U256
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