pub struct U256(pub [u64; 4]);
Expand description
Fixed non-negative integer type.
Tuple Fields§
§0: [u64; 4]
Implementations§
Source§impl U256
impl U256
Sourcepub const fn count_bits() -> u64
pub const fn count_bits() -> u64
Return the count of bits.
Sourcepub fn bit(&self, index: usize) -> Option<bool>
pub fn bit(&self, index: usize) -> Option<bool>
Return a specific bit, or return None when overlows.
Sourcepub fn set_bit(&mut self, index: usize, value: bool) -> bool
pub fn set_bit(&mut self, index: usize, value: bool) -> bool
Set a specific bit. Return false when overflows.
Sourcepub fn highest_one(&self) -> Option<usize>
pub fn highest_one(&self) -> Option<usize>
Return the highest bit which is one.
Sourcepub fn lowest_one(&self) -> Option<usize>
pub fn lowest_one(&self) -> Option<usize>
Return the lowest bit which is one.
Sourcepub const fn count_bytes() -> u64
pub const fn count_bytes() -> u64
Return the count of bytes.
Sourcepub fn byte(&self, index: usize) -> Option<u8>
pub fn byte(&self, index: usize) -> Option<u8>
Return a specific byte, or return None when overlows.
Sourcepub fn set_byte(&mut self, index: usize, byte: u8) -> bool
pub fn set_byte(&mut self, index: usize, byte: u8) -> bool
Set a specific byte. Return false when overflows;
Sourcepub fn highest_nonzero_byte(&self) -> Option<usize>
pub fn highest_nonzero_byte(&self) -> Option<usize>
Return the highest byte which is nonzero.
Sourcepub fn lowest_nonzero_byte(&self) -> Option<usize>
pub fn lowest_nonzero_byte(&self) -> Option<usize>
Return the lowest byte which is nonzero.
Sourcepub fn complete_mul(&self, other: &U256) -> (U256, U256)
pub fn complete_mul(&self, other: &U256) -> (U256, U256)
Calculates the multiplication of self
and other
.
Returns a tuple: (low, high)
,
low
is the low part of the multiplication,
high
is the low part of the multiplication.
The multiplication is equal to (high << Self::count_bits()) + low
.
Sourcepub fn complete_div(&self, other: &U256) -> (U256, U256)
pub fn complete_div(&self, other: &U256) -> (U256, U256)
Calculates both the quotient and the remainder when self
is divided by other
.
Returns a tuple: (quotient, remainder)
.
The self
is equal to quotient * other + remainder
.
Sourcepub const fn size_of() -> usize
pub const fn size_of() -> usize
Return the size used by this type in bytes, actually.
This size is greater than or equal to the bytes of this fixed type.
Sourcepub fn from_little_endian(input: &[u8]) -> Result<U256, FixedUintError>
pub fn from_little_endian(input: &[u8]) -> Result<U256, FixedUintError>
Convert from little-endian slice.
Sourcepub fn from_big_endian(input: &[u8]) -> Result<U256, FixedUintError>
pub fn from_big_endian(input: &[u8]) -> Result<U256, FixedUintError>
Convert from big-endian slice.
Sourcepub fn into_little_endian(
&self,
output: &mut [u8],
) -> Result<(), FixedUintError>
pub fn into_little_endian( &self, output: &mut [u8], ) -> Result<(), FixedUintError>
Convert into little-endian slice.
Sourcepub fn into_big_endian(&self, output: &mut [u8]) -> Result<(), FixedUintError>
pub fn into_big_endian(&self, output: &mut [u8]) -> Result<(), FixedUintError>
Convert into big-endian slice.
Sourcepub fn from_bin_str(input: &str) -> Result<U256, FixedUintError>
pub fn from_bin_str(input: &str) -> Result<U256, FixedUintError>
Convert from a binary string.
Sourcepub fn from_oct_str(input: &str) -> Result<U256, FixedUintError>
pub fn from_oct_str(input: &str) -> Result<U256, FixedUintError>
Convert from a octal string.
Sourcepub fn from_hex_str(input: &str) -> Result<U256, FixedUintError>
pub fn from_hex_str(input: &str) -> Result<U256, FixedUintError>
Convert from a hexadecimal string.
Sourcepub fn from_dec_str(input: &str) -> Result<U256, FixedUintError>
pub fn from_dec_str(input: &str) -> Result<U256, FixedUintError>
Convert from a decimal string.
Sourcepub const fn min_value() -> U256
pub const fn min_value() -> U256
Returns the smallest value that can be represented by this integer type.
Sourcepub const fn max_value() -> U256
pub const fn max_value() -> U256
Returns the largest value that can be represented by this integer type.
Sourcepub fn count_ones(&self) -> u32
pub fn count_ones(&self) -> u32
Returns the number of ones in the binary representation of self.
Sourcepub fn count_zeros(&self) -> u32
pub fn count_zeros(&self) -> u32
Returns the number of zeros in the binary representation of self.
Sourcepub fn leading_zeros(&self) -> u32
pub fn leading_zeros(&self) -> u32
Returns the number of leading zeros in the binary representation of self.
Sourcepub fn trailing_zeros(&self) -> u32
pub fn trailing_zeros(&self) -> u32
Returns the number of trailing zeros in the binary representation of self.
Sourcepub fn rotate_left(&self, n: u32) -> U256
pub fn rotate_left(&self, n: u32) -> U256
Shifts the bits to the left by a specified amount, n, wrapping the truncated bits to the end of the resulting integer.
Please note this isn’t the same operation as <<
!
Sourcepub fn rotate_right(&self, n: u32) -> U256
pub fn rotate_right(&self, n: u32) -> U256
Shifts the bits to the right by a specified amount, n, wrapping the truncated bits to the beginning of the resulting integer.
Please note this isn’t the same operation as >>
!
Sourcepub fn swap_bytes(self) -> U256
pub fn swap_bytes(self) -> U256
Reverses the byte order of the integer.
Sourcepub fn to_be_bytes(&self) -> [u8; 32]
pub fn to_be_bytes(&self) -> [u8; 32]
Return the memory representation of this integer as a byte array in big-endian (network) byte order.
Sourcepub fn to_le_bytes(&self) -> [u8; 32]
pub fn to_le_bytes(&self) -> [u8; 32]
Return the memory representation of this integer as a byte array in little-endian byte order.
Sourcepub fn to_ne_bytes(&self) -> [u8; 32]
pub fn to_ne_bytes(&self) -> [u8; 32]
Return the memory representation of this integer as a byte array in native byte order.
As the target platform’s native endianness is used, portable code should use to_be_bytes or to_le_bytes, as appropriate, instead.
Sourcepub fn from_be_bytes(bytes: &[u8; 32]) -> U256
pub fn from_be_bytes(bytes: &[u8; 32]) -> U256
Create an integer value from its representation as a byte array in big endian.
Sourcepub fn from_le_bytes(bytes: &[u8; 32]) -> U256
pub fn from_le_bytes(bytes: &[u8; 32]) -> U256
Create an integer value from its representation as a byte array in little endian.
Sourcepub fn from_ne_bytes(bytes: &[u8; 32]) -> U256
pub fn from_ne_bytes(bytes: &[u8; 32]) -> U256
Create an integer value from its memory representation as a byte array in native endianness.
As the target platform’s native endianness is used, portable code likely wants to use from_be_bytes or from_le_bytes, as appropriate instead.
Sourcepub fn pow(&self, exp: u32) -> U256
pub fn pow(&self, exp: u32) -> U256
Raises self to the power of exp
, using exponentiation by squaring.
Sourcepub fn is_power_of_two(&self) -> bool
pub fn is_power_of_two(&self) -> bool
Returns true
if and only if self == 2^k
for some k
.
Sourcepub fn next_power_of_two(&self) -> U256
pub fn next_power_of_two(&self) -> U256
Returns the smallest power of two greater than or equal to self
.
When return value overflows (i.e., self > (1 << (N-1))
for type uN
), it panics
in debug mode and return value is wrapped to 0 in release mode (the only situation
in which method can return 0).
Sourcepub fn checked_add(&self, rhs: &U256) -> Option<U256>
pub fn checked_add(&self, rhs: &U256) -> Option<U256>
Checked integer addition. Computes self + rhs
,
returning None
if overflow occurred.
Sourcepub fn checked_sub(&self, rhs: &U256) -> Option<U256>
pub fn checked_sub(&self, rhs: &U256) -> Option<U256>
Checked integer subtraction. Computes self - rhs
,
returning None
if overflow occurred.
Sourcepub fn checked_mul(&self, rhs: &U256) -> Option<U256>
pub fn checked_mul(&self, rhs: &U256) -> Option<U256>
Checked integer multiplication. Computes self * rhs
,
returning None
if overflow occurred.
Sourcepub fn checked_div(&self, rhs: &U256) -> Option<U256>
pub fn checked_div(&self, rhs: &U256) -> Option<U256>
Checked integer division. Computes self / rhs
, returning None
if rhs == 0
.
Sourcepub fn checked_rem(&self, rhs: &U256) -> Option<U256>
pub fn checked_rem(&self, rhs: &U256) -> Option<U256>
Checked integer remainder. Computes self % rhs
, returning None
if rhs == 0
.
Sourcepub fn checked_next_power_of_two(&self) -> Option<U256>
pub fn checked_next_power_of_two(&self) -> Option<U256>
Returns the smallest power of two greater than or equal to n
.
If the next power of two is greater than the type’s maximum value, None is returned,
otherwise the power of two is wrapped in Some
.
Sourcepub fn checked_pow(&self, exp: u32) -> Option<U256>
pub fn checked_pow(&self, exp: u32) -> Option<U256>
Checked exponentiation.
Computes self.pow(exp)
, returning None
if overflow occurred.
Sourcepub fn checked_shl(&self, rhs: u128) -> Option<U256>
pub fn checked_shl(&self, rhs: u128) -> Option<U256>
Checked shift left. Computes self << rhs
,
returning None
if rhs
is larger than or equal to the number of bits in self
.
Sourcepub fn checked_shr(&self, rhs: u128) -> Option<U256>
pub fn checked_shr(&self, rhs: u128) -> Option<U256>
Checked shift right. Computes self >> rhs
,
returning None
if rhs
is larger than or equal to the number of bits in self
.
Sourcepub fn checked_neg(&self) -> Option<U256>
pub fn checked_neg(&self) -> Option<U256>
Checked negation. Computes -self
, returning None
unless self == 0
.
Note that negating any positive integer will overflow.
Sourcepub fn saturating_add(&self, rhs: &U256) -> U256
pub fn saturating_add(&self, rhs: &U256) -> U256
Saturating integer addition. Computes self + rhs
,
saturating at the numeric bounds instead of overflowing.
Sourcepub fn saturating_sub(&self, rhs: &U256) -> U256
pub fn saturating_sub(&self, rhs: &U256) -> U256
Checked integer subtraction. Computes self - rhs
,
returning None
if overflow occurred.
Sourcepub fn saturating_mul(&self, rhs: &U256) -> U256
pub fn saturating_mul(&self, rhs: &U256) -> U256
Checked integer multiplication. Computes self * rhs
,
returning None
if overflow occurred.
Sourcepub fn saturating_pow(&self, exp: u32) -> U256
pub fn saturating_pow(&self, exp: u32) -> U256
Saturating integer exponentiation.
Computes self.pow(exp)
, saturating at the numeric bounds instead of overflowing.
Sourcepub fn overflowing_add(&self, rhs: &U256) -> (U256, bool)
pub fn overflowing_add(&self, rhs: &U256) -> (U256, bool)
Calculates self + rhs
.
Returns a tuple of the addition along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned.
Sourcepub fn overflowing_sub(&self, rhs: &U256) -> (U256, bool)
pub fn overflowing_sub(&self, rhs: &U256) -> (U256, bool)
Calculates self - rhs
.
Returns a tuple of the subtraction along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned.
Sourcepub fn overflowing_mul(&self, rhs: &U256) -> (U256, bool)
pub fn overflowing_mul(&self, rhs: &U256) -> (U256, bool)
Calculates the multiplication of self
and rhs
.
Returns a tuple of the multiplication along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned.
Sourcepub fn overflowing_div(&self, rhs: &U256) -> (U256, bool)
pub fn overflowing_div(&self, rhs: &U256) -> (U256, bool)
Calculates the divisor when self
is divided by rhs
.
Returns a tuple of the divisor along with a boolean indicating
whether an arithmetic overflow would occur.
Note that for unsigned integers overflow never occurs,
so the second value is always false
.
§Panics
This function will panic if rhs
is 0
.
Sourcepub fn overflowing_rem(&self, rhs: &U256) -> (U256, bool)
pub fn overflowing_rem(&self, rhs: &U256) -> (U256, bool)
Calculates the remainder when self
is divided by rhs
.
Returns a tuple of the remainder after dividing along with a boolean indicating
whether an arithmetic overflow would occur.
Note that for unsigned integers overflow never occurs,
so the second value is always false
.
§Panics
This function will panic if rhs
is 0
.
Sourcepub fn overflowing_pow(&self, exp: u32) -> (U256, bool)
pub fn overflowing_pow(&self, exp: u32) -> (U256, bool)
Raises self to the power of exp
, using exponentiation by squaring.
Returns a tuple of the exponentiation along with a bool indicating whether an
overflow happened.
Sourcepub fn overflowing_shl(&self, rhs: u128) -> (U256, bool)
pub fn overflowing_shl(&self, rhs: u128) -> (U256, bool)
Shifts self
left by rhs
bits.
Returns a tuple of the shifted version of self
along with a boolean indicating
whether the shift value was larger than or equal to the number of bits.
If the shift value is too large, then value is masked (N-1) where N is the number
of bits, and this value is then used to perform the shift.
Sourcepub fn overflowing_shr(&self, rhs: u128) -> (U256, bool)
pub fn overflowing_shr(&self, rhs: u128) -> (U256, bool)
Shifts self
right by rhs
bits.
Returns a tuple of the shifted version of self
along with a boolean indicating
whether the shift value was larger than or equal to the number of bits.
If the shift value is too large, then value is masked (N-1) where N is the number
of bits, and this value is then used to perform the shift.
Sourcepub fn overflowing_neg(&self) -> (U256, bool)
pub fn overflowing_neg(&self) -> (U256, bool)
Negates self
in an overflowing fashion.
Returns !self + 1
using wrapping operations to return the value that represents
the negation of this unsigned value.
Note that for positive unsigned values overflow always occurs,
but negating 0
does not overflow.
Sourcepub fn random<R>(rng: &mut R) -> U256where
R: RngCore,
pub fn random<R>(rng: &mut R) -> U256where
R: RngCore,
Create a random fixed uint with a input random core.
Sourcepub fn thread_random() -> U256
pub fn thread_random() -> U256
Create a random fixed uint.
Trait Implementations§
Source§impl Add<&U256> for &RationalU256
impl Add<&U256> for &RationalU256
Source§type Output = RationalU256
type Output = RationalU256
+
operator.Source§impl Add<&U256> for RationalU256
impl Add<&U256> for RationalU256
Source§type Output = RationalU256
type Output = RationalU256
+
operator.Source§impl Add<U256> for &RationalU256
impl Add<U256> for &RationalU256
Source§type Output = RationalU256
type Output = RationalU256
+
operator.Source§impl Add<U256> for RationalU256
impl Add<U256> for RationalU256
Source§type Output = RationalU256
type Output = RationalU256
+
operator.Source§impl<'a> AddAssign<&'a U256> for U256
impl<'a> AddAssign<&'a U256> for U256
Source§fn add_assign(&mut self, other: &U256)
fn add_assign(&mut self, other: &U256)
+=
operation. Read moreSource§impl<Rhs> AddAssign<Rhs> for U256
impl<Rhs> AddAssign<Rhs> for U256
Source§fn add_assign(&mut self, other: Rhs)
fn add_assign(&mut self, other: Rhs)
+=
operation. Read moreSource§impl AsByteSliceMut for U256
impl AsByteSliceMut for U256
Source§impl<'a> BitAndAssign<&'a U256> for U256
impl<'a> BitAndAssign<&'a U256> for U256
Source§fn bitand_assign(&mut self, other: &U256)
fn bitand_assign(&mut self, other: &U256)
&=
operation. Read moreSource§impl<Rhs> BitAndAssign<Rhs> for U256
impl<Rhs> BitAndAssign<Rhs> for U256
Source§fn bitand_assign(&mut self, other: Rhs)
fn bitand_assign(&mut self, other: Rhs)
&=
operation. Read moreSource§impl<'a> BitOrAssign<&'a U256> for U256
impl<'a> BitOrAssign<&'a U256> for U256
Source§fn bitor_assign(&mut self, other: &U256)
fn bitor_assign(&mut self, other: &U256)
|=
operation. Read moreSource§impl<Rhs> BitOrAssign<Rhs> for U256
impl<Rhs> BitOrAssign<Rhs> for U256
Source§fn bitor_assign(&mut self, other: Rhs)
fn bitor_assign(&mut self, other: Rhs)
|=
operation. Read moreSource§impl<'a> BitXorAssign<&'a U256> for U256
impl<'a> BitXorAssign<&'a U256> for U256
Source§fn bitxor_assign(&mut self, other: &U256)
fn bitxor_assign(&mut self, other: &U256)
^=
operation. Read moreSource§impl<Rhs> BitXorAssign<Rhs> for U256
impl<Rhs> BitXorAssign<Rhs> for U256
Source§fn bitxor_assign(&mut self, other: Rhs)
fn bitxor_assign(&mut self, other: Rhs)
^=
operation. Read moreSource§impl<'de> Deserialize<'de> for U256
impl<'de> Deserialize<'de> for U256
Source§fn deserialize<D>(
deserializer: D,
) -> Result<U256, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<U256, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Div<&U256> for &RationalU256
impl Div<&U256> for &RationalU256
Source§type Output = RationalU256
type Output = RationalU256
/
operator.Source§impl Div<&U256> for RationalU256
impl Div<&U256> for RationalU256
Source§type Output = RationalU256
type Output = RationalU256
/
operator.Source§impl Div<U256> for &RationalU256
impl Div<U256> for &RationalU256
Source§type Output = RationalU256
type Output = RationalU256
/
operator.Source§impl Div<U256> for RationalU256
impl Div<U256> for RationalU256
Source§type Output = RationalU256
type Output = RationalU256
/
operator.Source§impl<'a> DivAssign<&'a U256> for U256
impl<'a> DivAssign<&'a U256> for U256
Source§fn div_assign(&mut self, other: &U256)
fn div_assign(&mut self, other: &U256)
/=
operation. Read moreSource§impl<Rhs> DivAssign<Rhs> for U256
impl<Rhs> DivAssign<Rhs> for U256
Source§fn div_assign(&mut self, other: Rhs)
fn div_assign(&mut self, other: Rhs)
/=
operation. Read moreSource§impl HeapSizeOf for U256
impl HeapSizeOf for U256
Source§fn heap_size_of_children(&self) -> usize
fn heap_size_of_children(&self) -> usize
Source§impl Mul<&U256> for &RationalU256
impl Mul<&U256> for &RationalU256
Source§type Output = RationalU256
type Output = RationalU256
*
operator.Source§impl Mul<&U256> for RationalU256
impl Mul<&U256> for RationalU256
Source§type Output = RationalU256
type Output = RationalU256
*
operator.Source§impl Mul<U256> for &RationalU256
impl Mul<U256> for &RationalU256
Source§type Output = RationalU256
type Output = RationalU256
*
operator.Source§impl Mul<U256> for RationalU256
impl Mul<U256> for RationalU256
Source§type Output = RationalU256
type Output = RationalU256
*
operator.Source§impl<'a> MulAssign<&'a U256> for U256
impl<'a> MulAssign<&'a U256> for U256
Source§fn mul_assign(&mut self, other: &U256)
fn mul_assign(&mut self, other: &U256)
*=
operation. Read moreSource§impl<Rhs> MulAssign<Rhs> for U256
impl<Rhs> MulAssign<Rhs> for U256
Source§fn mul_assign(&mut self, other: Rhs)
fn mul_assign(&mut self, other: Rhs)
*=
operation. Read moreSource§impl Ord for U256
impl Ord for U256
Source§impl PartialOrd for U256
impl PartialOrd for U256
Source§impl<'a> RemAssign<&'a U256> for U256
impl<'a> RemAssign<&'a U256> for U256
Source§fn rem_assign(&mut self, other: &U256)
fn rem_assign(&mut self, other: &U256)
%=
operation. Read moreSource§impl<Rhs> RemAssign<Rhs> for U256
impl<Rhs> RemAssign<Rhs> for U256
Source§fn rem_assign(&mut self, other: Rhs)
fn rem_assign(&mut self, other: Rhs)
%=
operation. Read moreSource§impl Serialize for U256
impl Serialize for U256
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Source§impl<'a> ShlAssign<&'a i128> for U256
impl<'a> ShlAssign<&'a i128> for U256
Source§fn shl_assign(&mut self, other: &i128)
fn shl_assign(&mut self, other: &i128)
<<=
operation. Read moreSource§impl<'a> ShlAssign<&'a i16> for U256
impl<'a> ShlAssign<&'a i16> for U256
Source§fn shl_assign(&mut self, other: &i16)
fn shl_assign(&mut self, other: &i16)
<<=
operation. Read moreSource§impl<'a> ShlAssign<&'a i32> for U256
impl<'a> ShlAssign<&'a i32> for U256
Source§fn shl_assign(&mut self, other: &i32)
fn shl_assign(&mut self, other: &i32)
<<=
operation. Read moreSource§impl<'a> ShlAssign<&'a i64> for U256
impl<'a> ShlAssign<&'a i64> for U256
Source§fn shl_assign(&mut self, other: &i64)
fn shl_assign(&mut self, other: &i64)
<<=
operation. Read moreSource§impl<'a> ShlAssign<&'a i8> for U256
impl<'a> ShlAssign<&'a i8> for U256
Source§fn shl_assign(&mut self, other: &i8)
fn shl_assign(&mut self, other: &i8)
<<=
operation. Read moreSource§impl<'a> ShlAssign<&'a isize> for U256
impl<'a> ShlAssign<&'a isize> for U256
Source§fn shl_assign(&mut self, other: &isize)
fn shl_assign(&mut self, other: &isize)
<<=
operation. Read moreSource§impl<'a> ShlAssign<&'a u128> for U256
impl<'a> ShlAssign<&'a u128> for U256
Source§fn shl_assign(&mut self, other: &u128)
fn shl_assign(&mut self, other: &u128)
<<=
operation. Read moreSource§impl<'a> ShlAssign<&'a u16> for U256
impl<'a> ShlAssign<&'a u16> for U256
Source§fn shl_assign(&mut self, other: &u16)
fn shl_assign(&mut self, other: &u16)
<<=
operation. Read moreSource§impl<'a> ShlAssign<&'a u32> for U256
impl<'a> ShlAssign<&'a u32> for U256
Source§fn shl_assign(&mut self, other: &u32)
fn shl_assign(&mut self, other: &u32)
<<=
operation. Read moreSource§impl<'a> ShlAssign<&'a u64> for U256
impl<'a> ShlAssign<&'a u64> for U256
Source§fn shl_assign(&mut self, other: &u64)
fn shl_assign(&mut self, other: &u64)
<<=
operation. Read moreSource§impl<'a> ShlAssign<&'a u8> for U256
impl<'a> ShlAssign<&'a u8> for U256
Source§fn shl_assign(&mut self, other: &u8)
fn shl_assign(&mut self, other: &u8)
<<=
operation. Read moreSource§impl<'a> ShlAssign<&'a usize> for U256
impl<'a> ShlAssign<&'a usize> for U256
Source§fn shl_assign(&mut self, other: &usize)
fn shl_assign(&mut self, other: &usize)
<<=
operation. Read moreSource§impl ShlAssign<i128> for U256
impl ShlAssign<i128> for U256
Source§fn shl_assign(&mut self, other: i128)
fn shl_assign(&mut self, other: i128)
<<=
operation. Read moreSource§impl ShlAssign<i16> for U256
impl ShlAssign<i16> for U256
Source§fn shl_assign(&mut self, other: i16)
fn shl_assign(&mut self, other: i16)
<<=
operation. Read moreSource§impl ShlAssign<i32> for U256
impl ShlAssign<i32> for U256
Source§fn shl_assign(&mut self, other: i32)
fn shl_assign(&mut self, other: i32)
<<=
operation. Read moreSource§impl ShlAssign<i64> for U256
impl ShlAssign<i64> for U256
Source§fn shl_assign(&mut self, other: i64)
fn shl_assign(&mut self, other: i64)
<<=
operation. Read moreSource§impl ShlAssign<i8> for U256
impl ShlAssign<i8> for U256
Source§fn shl_assign(&mut self, other: i8)
fn shl_assign(&mut self, other: i8)
<<=
operation. Read moreSource§impl ShlAssign<isize> for U256
impl ShlAssign<isize> for U256
Source§fn shl_assign(&mut self, other: isize)
fn shl_assign(&mut self, other: isize)
<<=
operation. Read moreSource§impl ShlAssign<u128> for U256
impl ShlAssign<u128> for U256
Source§fn shl_assign(&mut self, other: u128)
fn shl_assign(&mut self, other: u128)
<<=
operation. Read moreSource§impl ShlAssign<u16> for U256
impl ShlAssign<u16> for U256
Source§fn shl_assign(&mut self, other: u16)
fn shl_assign(&mut self, other: u16)
<<=
operation. Read moreSource§impl ShlAssign<u32> for U256
impl ShlAssign<u32> for U256
Source§fn shl_assign(&mut self, other: u32)
fn shl_assign(&mut self, other: u32)
<<=
operation. Read moreSource§impl ShlAssign<u64> for U256
impl ShlAssign<u64> for U256
Source§fn shl_assign(&mut self, other: u64)
fn shl_assign(&mut self, other: u64)
<<=
operation. Read moreSource§impl ShlAssign<u8> for U256
impl ShlAssign<u8> for U256
Source§fn shl_assign(&mut self, other: u8)
fn shl_assign(&mut self, other: u8)
<<=
operation. Read moreSource§impl ShlAssign<usize> for U256
impl ShlAssign<usize> for U256
Source§fn shl_assign(&mut self, other: usize)
fn shl_assign(&mut self, other: usize)
<<=
operation. Read moreSource§impl<'a> ShrAssign<&'a i128> for U256
impl<'a> ShrAssign<&'a i128> for U256
Source§fn shr_assign(&mut self, other: &i128)
fn shr_assign(&mut self, other: &i128)
>>=
operation. Read moreSource§impl<'a> ShrAssign<&'a i16> for U256
impl<'a> ShrAssign<&'a i16> for U256
Source§fn shr_assign(&mut self, other: &i16)
fn shr_assign(&mut self, other: &i16)
>>=
operation. Read moreSource§impl<'a> ShrAssign<&'a i32> for U256
impl<'a> ShrAssign<&'a i32> for U256
Source§fn shr_assign(&mut self, other: &i32)
fn shr_assign(&mut self, other: &i32)
>>=
operation. Read moreSource§impl<'a> ShrAssign<&'a i64> for U256
impl<'a> ShrAssign<&'a i64> for U256
Source§fn shr_assign(&mut self, other: &i64)
fn shr_assign(&mut self, other: &i64)
>>=
operation. Read moreSource§impl<'a> ShrAssign<&'a i8> for U256
impl<'a> ShrAssign<&'a i8> for U256
Source§fn shr_assign(&mut self, other: &i8)
fn shr_assign(&mut self, other: &i8)
>>=
operation. Read moreSource§impl<'a> ShrAssign<&'a isize> for U256
impl<'a> ShrAssign<&'a isize> for U256
Source§fn shr_assign(&mut self, other: &isize)
fn shr_assign(&mut self, other: &isize)
>>=
operation. Read moreSource§impl<'a> ShrAssign<&'a u128> for U256
impl<'a> ShrAssign<&'a u128> for U256
Source§fn shr_assign(&mut self, other: &u128)
fn shr_assign(&mut self, other: &u128)
>>=
operation. Read moreSource§impl<'a> ShrAssign<&'a u16> for U256
impl<'a> ShrAssign<&'a u16> for U256
Source§fn shr_assign(&mut self, other: &u16)
fn shr_assign(&mut self, other: &u16)
>>=
operation. Read moreSource§impl<'a> ShrAssign<&'a u32> for U256
impl<'a> ShrAssign<&'a u32> for U256
Source§fn shr_assign(&mut self, other: &u32)
fn shr_assign(&mut self, other: &u32)
>>=
operation. Read moreSource§impl<'a> ShrAssign<&'a u64> for U256
impl<'a> ShrAssign<&'a u64> for U256
Source§fn shr_assign(&mut self, other: &u64)
fn shr_assign(&mut self, other: &u64)
>>=
operation. Read moreSource§impl<'a> ShrAssign<&'a u8> for U256
impl<'a> ShrAssign<&'a u8> for U256
Source§fn shr_assign(&mut self, other: &u8)
fn shr_assign(&mut self, other: &u8)
>>=
operation. Read moreSource§impl<'a> ShrAssign<&'a usize> for U256
impl<'a> ShrAssign<&'a usize> for U256
Source§fn shr_assign(&mut self, other: &usize)
fn shr_assign(&mut self, other: &usize)
>>=
operation. Read moreSource§impl ShrAssign<i128> for U256
impl ShrAssign<i128> for U256
Source§fn shr_assign(&mut self, other: i128)
fn shr_assign(&mut self, other: i128)
>>=
operation. Read moreSource§impl ShrAssign<i16> for U256
impl ShrAssign<i16> for U256
Source§fn shr_assign(&mut self, other: i16)
fn shr_assign(&mut self, other: i16)
>>=
operation. Read moreSource§impl ShrAssign<i32> for U256
impl ShrAssign<i32> for U256
Source§fn shr_assign(&mut self, other: i32)
fn shr_assign(&mut self, other: i32)
>>=
operation. Read moreSource§impl ShrAssign<i64> for U256
impl ShrAssign<i64> for U256
Source§fn shr_assign(&mut self, other: i64)
fn shr_assign(&mut self, other: i64)
>>=
operation. Read moreSource§impl ShrAssign<i8> for U256
impl ShrAssign<i8> for U256
Source§fn shr_assign(&mut self, other: i8)
fn shr_assign(&mut self, other: i8)
>>=
operation. Read moreSource§impl ShrAssign<isize> for U256
impl ShrAssign<isize> for U256
Source§fn shr_assign(&mut self, other: isize)
fn shr_assign(&mut self, other: isize)
>>=
operation. Read moreSource§impl ShrAssign<u128> for U256
impl ShrAssign<u128> for U256
Source§fn shr_assign(&mut self, other: u128)
fn shr_assign(&mut self, other: u128)
>>=
operation. Read moreSource§impl ShrAssign<u16> for U256
impl ShrAssign<u16> for U256
Source§fn shr_assign(&mut self, other: u16)
fn shr_assign(&mut self, other: u16)
>>=
operation. Read moreSource§impl ShrAssign<u32> for U256
impl ShrAssign<u32> for U256
Source§fn shr_assign(&mut self, other: u32)
fn shr_assign(&mut self, other: u32)
>>=
operation. Read moreSource§impl ShrAssign<u64> for U256
impl ShrAssign<u64> for U256
Source§fn shr_assign(&mut self, other: u64)
fn shr_assign(&mut self, other: u64)
>>=
operation. Read moreSource§impl ShrAssign<u8> for U256
impl ShrAssign<u8> for U256
Source§fn shr_assign(&mut self, other: u8)
fn shr_assign(&mut self, other: u8)
>>=
operation. Read moreSource§impl ShrAssign<usize> for U256
impl ShrAssign<usize> for U256
Source§fn shr_assign(&mut self, other: usize)
fn shr_assign(&mut self, other: usize)
>>=
operation. Read moreSource§impl Sub<&U256> for &RationalU256
impl Sub<&U256> for &RationalU256
Source§type Output = RationalU256
type Output = RationalU256
-
operator.Source§impl Sub<&U256> for RationalU256
impl Sub<&U256> for RationalU256
Source§type Output = RationalU256
type Output = RationalU256
-
operator.Source§impl Sub<U256> for &RationalU256
impl Sub<U256> for &RationalU256
Source§type Output = RationalU256
type Output = RationalU256
-
operator.Source§impl Sub<U256> for RationalU256
impl Sub<U256> for RationalU256
Source§type Output = RationalU256
type Output = RationalU256
-
operator.Source§impl<'a> SubAssign<&'a U256> for U256
impl<'a> SubAssign<&'a U256> for U256
Source§fn sub_assign(&mut self, other: &U256)
fn sub_assign(&mut self, other: &U256)
-=
operation. Read moreSource§impl<Rhs> SubAssign<Rhs> for U256
impl<Rhs> SubAssign<Rhs> for U256
Source§fn sub_assign(&mut self, other: Rhs)
fn sub_assign(&mut self, other: Rhs)
-=
operation. Read moreSource§impl UintConvert<U1024> for U256
impl UintConvert<U1024> for U256
Source§fn convert_into(&self) -> (U1024, bool)
fn convert_into(&self) -> (U1024, bool)
Source§impl UintConvert<U128> for U256
impl UintConvert<U128> for U256
Source§fn convert_into(&self) -> (U128, bool)
fn convert_into(&self) -> (U128, bool)
Source§impl UintConvert<U160> for U256
impl UintConvert<U160> for U256
Source§fn convert_into(&self) -> (U160, bool)
fn convert_into(&self) -> (U160, bool)
Source§impl UintConvert<U2048> for U256
impl UintConvert<U2048> for U256
Source§fn convert_into(&self) -> (U2048, bool)
fn convert_into(&self) -> (U2048, bool)
Source§impl UintConvert<U224> for U256
impl UintConvert<U224> for U256
Source§fn convert_into(&self) -> (U224, bool)
fn convert_into(&self) -> (U224, bool)
Source§impl UintConvert<U256> for U128
impl UintConvert<U256> for U128
Source§fn convert_into(&self) -> (U256, bool)
fn convert_into(&self) -> (U256, bool)
Source§impl UintConvert<U384> for U256
impl UintConvert<U384> for U256
Source§fn convert_into(&self) -> (U384, bool)
fn convert_into(&self) -> (U384, bool)
Source§impl UintConvert<U4096> for U256
impl UintConvert<U4096> for U256
Source§fn convert_into(&self) -> (U4096, bool)
fn convert_into(&self) -> (U4096, bool)
Source§impl UintConvert<U512> for U256
impl UintConvert<U512> for U256
Source§fn convert_into(&self) -> (U512, bool)
fn convert_into(&self) -> (U512, bool)
Source§impl UintConvert<U520> for U256
impl UintConvert<U520> for U256
Source§fn convert_into(&self) -> (U520, bool)
fn convert_into(&self) -> (U520, bool)
Source§impl<'r> Unpack<U256> for Uint256Reader<'r>
impl<'r> Unpack<U256> for Uint256Reader<'r>
impl Eq 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)