Struct esvm_bigint::U256
[−]
[src]
#[repr(C)]pub struct U256(_);
Represents an unsigned 256-bit integer.
Methods
impl U256
[src]
fn zero() -> U256
Zero value of U256.
fn one() -> U256
One value of U256.
fn max_value() -> U256
Maximum value of U256.
fn min_value() -> U256
Minimum value of U256.
fn overflowing_add(self, other: U256) -> (U256, bool)
Add two U256 with overflowing. The same as M256::add.
fn underflowing_sub(self, other: U256) -> (U256, bool)
Substract two U256 with underflowing. The same as M256::sub.
fn overflowing_mul(self, other: U256) -> (U256, bool)
Multiply two U256 with overflowing. The same as M256::mul.
fn bits(&self) -> usize
Bits needed to represent this value.
fn log2floor(&self) -> usize
Equals floor(log2(*))
. This is always an integer.
Trait Implementations
impl Eq for U256
[src]
impl PartialEq for U256
[src]
fn eq(&self, __arg_0: &U256) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &U256) -> bool
This method tests for !=
.
impl Debug for U256
[src]
impl Copy for U256
[src]
impl Clone for U256
[src]
fn clone(&self) -> U256
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Hash for U256
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Default for U256
[src]
impl FromStr for U256
[src]
type Err = ParseHexError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<U256, ParseHexError>
Parses a string s
to return a value of this type. Read more
impl From<bool> for U256
[src]
impl From<u64> for U256
[src]
impl Into<u64> for U256
[src]
impl From<usize> for U256
[src]
impl Into<usize> for U256
[src]
impl<'a> From<&'a [u8]> for U256
[src]
impl From<[u8; 32]> for U256
[src]
impl Into<[u8; 32]> for U256
[src]
impl Into<[u32; 8]> for U256
[src]
impl From<[u32; 8]> for U256
[src]
impl Ord for U256
[src]
fn cmp(&self, other: &U256) -> Ordering
This method returns an Ordering
between self
and other
. Read more
impl PartialOrd for U256
[src]
fn partial_cmp(&self, other: &U256) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl BitAnd<U256> for U256
[src]
type Output = U256
The resulting type after applying the &
operator
fn bitand(self, other: U256) -> U256
The method for the &
operator
impl BitOr<U256> for U256
[src]
type Output = U256
The resulting type after applying the |
operator
fn bitor(self, other: U256) -> U256
The method for the |
operator
impl BitXor<U256> for U256
[src]
type Output = U256
The resulting type after applying the ^
operator
fn bitxor(self, other: U256) -> U256
The method for the ^
operator
impl Shl<usize> for U256
[src]
type Output = U256
The resulting type after applying the <<
operator
fn shl(self, shift: usize) -> U256
The method for the <<
operator
impl Shr<usize> for U256
[src]
type Output = U256
The resulting type after applying the >>
operator
fn shr(self, shift: usize) -> U256
The method for the >>
operator
impl Add<U256> for U256
[src]
type Output = U256
The resulting type after applying the +
operator
fn add(self, other: U256) -> U256
The method for the +
operator
impl Sub<U256> for U256
[src]
type Output = U256
The resulting type after applying the -
operator
fn sub(self, other: U256) -> U256
The method for the -
operator
impl Mul<U256> for U256
[src]
type Output = U256
The resulting type after applying the *
operator
fn mul(self, other: U256) -> U256
The method for the *
operator
impl Div for U256
[src]
type Output = U256
The resulting type after applying the /
operator
fn div(self, other: U256) -> U256
The method for the /
operator
impl Rem for U256
[src]
type Output = U256
The resulting type after applying the %
operator
fn rem(self, other: U256) -> U256
The method for the %
operator
impl Not for U256
[src]
type Output = U256
The resulting type after applying the !
operator
fn not(self) -> U256
The method for the unary !
operator