Struct ckb_types::U256 [−]
Expand description
Fixed non-negative integer type.
Tuple Fields
0: [u64; 4]
Implementations
impl U256
impl U256
pub const fn count_bits() -> u64
pub const fn count_bits() -> u64
Return the count of bits.
Set a specific bit. Return false when overflows.
pub fn highest_one(&self) -> Option<usize>
pub fn highest_one(&self) -> Option<usize>
Return the highest bit which is one.
pub fn lowest_one(&self) -> Option<usize>
pub fn lowest_one(&self) -> Option<usize>
Return the lowest bit which is one.
pub const fn count_bytes() -> u64
pub const fn count_bytes() -> u64
Return the count of bytes.
Set a specific byte. Return false when overflows;
pub fn highest_nonzero_byte(&self) -> Option<usize>
pub fn highest_nonzero_byte(&self) -> Option<usize>
Return the highest byte which is nonzero.
pub fn lowest_nonzero_byte(&self) -> Option<usize>
pub fn lowest_nonzero_byte(&self) -> Option<usize>
Return the lowest byte which is nonzero.
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
.
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
.
Return the size used by this type in bytes, actually.
This size is greater than or equal to the bytes of this fixed type.
Convert from little-endian slice.
Convert into little-endian slice.
Convert into big-endian slice.
pub fn from_bin_str(input: &str) -> Result<U256, FixedUintError>
pub fn from_bin_str(input: &str) -> Result<U256, FixedUintError>
Convert from a binary string.
pub fn from_oct_str(input: &str) -> Result<U256, FixedUintError>
pub fn from_oct_str(input: &str) -> Result<U256, FixedUintError>
Convert from a octal string.
pub fn from_hex_str(input: &str) -> Result<U256, FixedUintError>
pub fn from_hex_str(input: &str) -> Result<U256, FixedUintError>
Convert from a hexadecimal string.
pub fn from_dec_str(input: &str) -> Result<U256, FixedUintError>
pub fn from_dec_str(input: &str) -> Result<U256, FixedUintError>
Convert from a decimal string.
Returns the smallest value that can be represented by this integer type.
Returns the largest value that can be represented by this integer type.
pub fn count_ones(&self) -> u32
pub fn count_ones(&self) -> u32
Returns the number of ones in the binary representation of self.
pub fn count_zeros(&self) -> u32
pub fn count_zeros(&self) -> u32
Returns the number of zeros in the binary representation of self.
pub fn leading_zeros(&self) -> u32
pub fn leading_zeros(&self) -> u32
Returns the number of leading zeros in the binary representation of self.
pub fn trailing_zeros(&self) -> u32
pub fn trailing_zeros(&self) -> u32
Returns the number of trailing zeros in the binary representation of self.
pub 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 <<
!
pub 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 >>
!
pub fn swap_bytes(self) -> U256
pub fn swap_bytes(self) -> U256
Reverses the byte order of the integer.
pub 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.
pub 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.
pub 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.
pub 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.
pub 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.
pub 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.
Raises self to the power of exp
, using exponentiation by squaring.
pub 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
.
pub 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).
pub 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.
pub 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.
pub 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.
pub 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
.
pub 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
.
pub 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
.
pub 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.
pub 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
.
pub 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
.
pub 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.
pub 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.
pub 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.
pub 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.
pub 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.
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.
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.
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.
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
.
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
.
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.
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.
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.
pub 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.
Create a random fixed uint with a input random core.
pub fn thread_random() -> U256
pub fn thread_random() -> U256
Create a random fixed uint.
Trait Implementations
type Output = RationalU256
type Output = RationalU256
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = RationalU256
type Output = RationalU256
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = RationalU256
type Output = RationalU256
The resulting type after applying the +
operator.
Performs the +
operation. Read more
type Output = RationalU256
type Output = RationalU256
The resulting type after applying the +
operator.
Performs the +
operation. Read more
pub fn add_assign(&mut self, other: &U256)
pub fn add_assign(&mut self, other: &U256)
Performs the +=
operation. Read more
pub fn add_assign(&mut self, other: Rhs)
pub fn add_assign(&mut self, other: Rhs)
Performs the +=
operation. Read more
impl AsByteSliceMut for U256
impl AsByteSliceMut for U256
pub fn as_byte_slice_mut(&mut self) -> &mut [u8]
pub fn as_byte_slice_mut(&mut self) -> &mut [u8]
Return a mutable reference to self as a byte slice
pub fn to_le(&mut self)
pub fn to_le(&mut self)
Call to_le
on each element (i.e. byte-swap on Big Endian platforms).
impl<'a> BitAndAssign<&'a U256> for U256
impl<'a> BitAndAssign<&'a U256> for U256
pub fn bitand_assign(&mut self, other: &U256)
pub fn bitand_assign(&mut self, other: &U256)
Performs the &=
operation. Read more
impl<Rhs> BitAndAssign<Rhs> for U256 where
Rhs: Into<U256>,
impl<Rhs> BitAndAssign<Rhs> for U256 where
Rhs: Into<U256>,
pub fn bitand_assign(&mut self, other: Rhs)
pub fn bitand_assign(&mut self, other: Rhs)
Performs the &=
operation. Read more
impl<'a> BitOrAssign<&'a U256> for U256
impl<'a> BitOrAssign<&'a U256> for U256
pub fn bitor_assign(&mut self, other: &U256)
pub fn bitor_assign(&mut self, other: &U256)
Performs the |=
operation. Read more
impl<Rhs> BitOrAssign<Rhs> for U256 where
Rhs: Into<U256>,
impl<Rhs> BitOrAssign<Rhs> for U256 where
Rhs: Into<U256>,
pub fn bitor_assign(&mut self, other: Rhs)
pub fn bitor_assign(&mut self, other: Rhs)
Performs the |=
operation. Read more
impl<'a> BitXorAssign<&'a U256> for U256
impl<'a> BitXorAssign<&'a U256> for U256
pub fn bitxor_assign(&mut self, other: &U256)
pub fn bitxor_assign(&mut self, other: &U256)
Performs the ^=
operation. Read more
impl<Rhs> BitXorAssign<Rhs> for U256 where
Rhs: Into<U256>,
impl<Rhs> BitXorAssign<Rhs> for U256 where
Rhs: Into<U256>,
pub fn bitxor_assign(&mut self, other: Rhs)
pub fn bitxor_assign(&mut self, other: Rhs)
Performs the ^=
operation. Read more
impl<'de> Deserialize<'de> for U256
impl<'de> Deserialize<'de> for U256
pub fn deserialize<D>(
deserializer: D
) -> Result<U256, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
pub fn deserialize<D>(
deserializer: D
) -> Result<U256, <D as Deserializer<'de>>::Error> where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
type Output = RationalU256
type Output = RationalU256
The resulting type after applying the /
operator.
Performs the /
operation. Read more
type Output = RationalU256
type Output = RationalU256
The resulting type after applying the /
operator.
Performs the /
operation. Read more
type Output = RationalU256
type Output = RationalU256
The resulting type after applying the /
operator.
Performs the /
operation. Read more
type Output = RationalU256
type Output = RationalU256
The resulting type after applying the /
operator.
Performs the /
operation. Read more
pub fn div_assign(&mut self, other: &U256)
pub fn div_assign(&mut self, other: &U256)
Performs the /=
operation. Read more
pub fn div_assign(&mut self, other: Rhs)
pub fn div_assign(&mut self, other: Rhs)
Performs the /=
operation. Read more
impl HeapSizeOf for U256
impl HeapSizeOf for U256
pub fn heap_size_of_children(&self) -> usize
pub fn heap_size_of_children(&self) -> usize
Measure the size of any heap-allocated structures that hang off this value, but not the
space taken up by the value itself (i.e. what size_of::
type Output = RationalU256
type Output = RationalU256
The resulting type after applying the *
operator.
Performs the *
operation. Read more
type Output = RationalU256
type Output = RationalU256
The resulting type after applying the *
operator.
Performs the *
operation. Read more
type Output = RationalU256
type Output = RationalU256
The resulting type after applying the *
operator.
Performs the *
operation. Read more
type Output = RationalU256
type Output = RationalU256
The resulting type after applying the *
operator.
Performs the *
operation. Read more
pub fn mul_assign(&mut self, other: &U256)
pub fn mul_assign(&mut self, other: &U256)
Performs the *=
operation. Read more
pub fn mul_assign(&mut self, other: Rhs)
pub fn mul_assign(&mut self, other: Rhs)
Performs the *=
operation. Read more
impl PartialOrd<U256> for U256
impl PartialOrd<U256> for U256
pub fn partial_cmp(&self, other: &U256) -> Option<Ordering>
pub fn partial_cmp(&self, other: &U256) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
pub fn rem_assign(&mut self, other: &U256)
pub fn rem_assign(&mut self, other: &U256)
Performs the %=
operation. Read more
pub fn rem_assign(&mut self, other: Rhs)
pub fn rem_assign(&mut self, other: Rhs)
Performs the %=
operation. Read more
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
pub fn serialize<S>(
&self,
serializer: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error> where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
pub fn shl_assign(&mut self, other: &i128)
pub fn shl_assign(&mut self, other: &i128)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: &i16)
pub fn shl_assign(&mut self, other: &i16)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: &i32)
pub fn shl_assign(&mut self, other: &i32)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: &i64)
pub fn shl_assign(&mut self, other: &i64)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: &i8)
pub fn shl_assign(&mut self, other: &i8)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: &isize)
pub fn shl_assign(&mut self, other: &isize)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: &u128)
pub fn shl_assign(&mut self, other: &u128)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: &u16)
pub fn shl_assign(&mut self, other: &u16)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: &u32)
pub fn shl_assign(&mut self, other: &u32)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: &u64)
pub fn shl_assign(&mut self, other: &u64)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: &u8)
pub fn shl_assign(&mut self, other: &u8)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: &usize)
pub fn shl_assign(&mut self, other: &usize)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: i128)
pub fn shl_assign(&mut self, other: i128)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: i16)
pub fn shl_assign(&mut self, other: i16)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: i32)
pub fn shl_assign(&mut self, other: i32)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: i64)
pub fn shl_assign(&mut self, other: i64)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: i8)
pub fn shl_assign(&mut self, other: i8)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: isize)
pub fn shl_assign(&mut self, other: isize)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: u128)
pub fn shl_assign(&mut self, other: u128)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: u16)
pub fn shl_assign(&mut self, other: u16)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: u32)
pub fn shl_assign(&mut self, other: u32)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: u64)
pub fn shl_assign(&mut self, other: u64)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: u8)
pub fn shl_assign(&mut self, other: u8)
Performs the <<=
operation. Read more
pub fn shl_assign(&mut self, other: usize)
pub fn shl_assign(&mut self, other: usize)
Performs the <<=
operation. Read more
pub fn shr_assign(&mut self, other: &i128)
pub fn shr_assign(&mut self, other: &i128)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: &i16)
pub fn shr_assign(&mut self, other: &i16)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: &i32)
pub fn shr_assign(&mut self, other: &i32)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: &i64)
pub fn shr_assign(&mut self, other: &i64)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: &i8)
pub fn shr_assign(&mut self, other: &i8)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: &isize)
pub fn shr_assign(&mut self, other: &isize)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: &u128)
pub fn shr_assign(&mut self, other: &u128)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: &u16)
pub fn shr_assign(&mut self, other: &u16)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: &u32)
pub fn shr_assign(&mut self, other: &u32)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: &u64)
pub fn shr_assign(&mut self, other: &u64)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: &u8)
pub fn shr_assign(&mut self, other: &u8)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: &usize)
pub fn shr_assign(&mut self, other: &usize)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: i128)
pub fn shr_assign(&mut self, other: i128)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: i16)
pub fn shr_assign(&mut self, other: i16)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: i32)
pub fn shr_assign(&mut self, other: i32)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: i64)
pub fn shr_assign(&mut self, other: i64)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: i8)
pub fn shr_assign(&mut self, other: i8)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: isize)
pub fn shr_assign(&mut self, other: isize)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: u128)
pub fn shr_assign(&mut self, other: u128)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: u16)
pub fn shr_assign(&mut self, other: u16)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: u32)
pub fn shr_assign(&mut self, other: u32)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: u64)
pub fn shr_assign(&mut self, other: u64)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: u8)
pub fn shr_assign(&mut self, other: u8)
Performs the >>=
operation. Read more
pub fn shr_assign(&mut self, other: usize)
pub fn shr_assign(&mut self, other: usize)
Performs the >>=
operation. Read more
type Output = RationalU256
type Output = RationalU256
The resulting type after applying the -
operator.
Performs the -
operation. Read more
type Output = RationalU256
type Output = RationalU256
The resulting type after applying the -
operator.
Performs the -
operation. Read more
type Output = RationalU256
type Output = RationalU256
The resulting type after applying the -
operator.
Performs the -
operation. Read more
type Output = RationalU256
type Output = RationalU256
The resulting type after applying the -
operator.
Performs the -
operation. Read more
pub fn sub_assign(&mut self, other: &U256)
pub fn sub_assign(&mut self, other: &U256)
Performs the -=
operation. Read more
pub fn sub_assign(&mut self, other: Rhs)
pub fn sub_assign(&mut self, other: Rhs)
Performs the -=
operation. Read more
impl UintConvert<U1024> for U256
impl UintConvert<U1024> for U256
pub fn convert_into(&self) -> (U1024, bool)
pub fn convert_into(&self) -> (U1024, bool)
Convert a fixed uint into another, return the new fixed uint and if it be truncated.
pub fn convert_into(&self) -> (U128, bool)
pub fn convert_into(&self) -> (U128, bool)
Convert a fixed uint into another, return the new fixed uint and if it be truncated.
impl UintConvert<U160> for U256
impl UintConvert<U160> for U256
pub fn convert_into(&self) -> (U160, bool)
pub fn convert_into(&self) -> (U160, bool)
Convert a fixed uint into another, return the new fixed uint and if it be truncated.
impl UintConvert<U2048> for U256
impl UintConvert<U2048> for U256
pub fn convert_into(&self) -> (U2048, bool)
pub fn convert_into(&self) -> (U2048, bool)
Convert a fixed uint into another, return the new fixed uint and if it be truncated.
impl UintConvert<U224> for U256
impl UintConvert<U224> for U256
pub fn convert_into(&self) -> (U224, bool)
pub fn convert_into(&self) -> (U224, bool)
Convert a fixed uint into another, return the new fixed uint and if it be truncated.
pub fn convert_into(&self) -> (U256, bool)
pub fn convert_into(&self) -> (U256, bool)
Convert a fixed uint into another, return the new fixed uint and if it be truncated.
impl UintConvert<U384> for U256
impl UintConvert<U384> for U256
pub fn convert_into(&self) -> (U384, bool)
pub fn convert_into(&self) -> (U384, bool)
Convert a fixed uint into another, return the new fixed uint and if it be truncated.
impl UintConvert<U4096> for U256
impl UintConvert<U4096> for U256
pub fn convert_into(&self) -> (U4096, bool)
pub fn convert_into(&self) -> (U4096, bool)
Convert a fixed uint into another, return the new fixed uint and if it be truncated.
impl UintConvert<U512> for U256
impl UintConvert<U512> for U256
pub fn convert_into(&self) -> (U512, bool)
pub fn convert_into(&self) -> (U512, bool)
Convert a fixed uint into another, return the new fixed uint and if it be truncated.
impl UintConvert<U520> for U256
impl UintConvert<U520> for U256
pub fn convert_into(&self) -> (U520, bool)
pub fn convert_into(&self) -> (U520, bool)
Convert a fixed uint into another, return the new fixed uint and if it be truncated.
Auto Trait Implementations
impl RefUnwindSafe for U256
impl UnwindSafe for U256
Blanket Implementations
Mutably borrows from an owned value. Read more