[−]Struct verification::bigint::uint::U256
Little-endian large integer type
Methods
impl U256
impl U256
pub fn full_mul(self, other: U256) -> U512
pub fn full_mul(self, other: U256) -> U512
Multiplies two 256-bit integers to produce full 512-bit integer No overflow possible
Trait Implementations
impl From<Compact> for U256
[src]
impl From<Compact> for U256
impl From<U256> for Compact
[src]
impl From<U256> for Compact
impl Ord for U256
impl Ord for U256
fn cmp(&self, other: &U256) -> Ordering
fn cmp(&self, other: &U256) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Eq for U256
impl Eq for U256
impl PartialEq<U256> for U256
impl PartialEq<U256> for U256
fn eq(&self, other: &U256) -> bool
fn eq(&self, other: &U256) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &U256) -> bool
fn ne(&self, other: &U256) -> bool
This method tests for !=
.
impl Mul<U256> for U256
impl Mul<U256> for U256
type Output = U256
The resulting type after applying the *
operator.
fn mul(self, other: U256) -> U256
fn mul(self, other: U256) -> U256
Performs the *
operation.
impl Debug for U256
impl Debug for U256
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl FromStr for U256
impl FromStr for U256
type Err = FromHexError
The associated error which can be returned from parsing.
fn from_str(value: &str) -> Result<U256, <U256 as FromStr>::Err>
fn from_str(value: &str) -> Result<U256, <U256 as FromStr>::Err>
Parses a string s
to return a value of this type. Read more
impl BitXor<U256> for U256
impl BitXor<U256> for U256
type Output = U256
The resulting type after applying the ^
operator.
fn bitxor(self, other: U256) -> U256
fn bitxor(self, other: U256) -> U256
Performs the ^
operation.
impl Hash for U256
impl Hash for U256
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Uint for U256
impl Uint for U256
fn from_dec_str(value: &str) -> Result<U256, FromDecStrErr>
fn from_dec_str(value: &str) -> Result<U256, FromDecStrErr>
Convert from a decimal string.
fn low_u32(&self) -> u32
fn low_u32(&self) -> u32
Conversion to u32
fn low_u64(&self) -> u64
fn low_u64(&self) -> u64
Conversion to u64
fn as_u32(&self) -> u32
fn as_u32(&self) -> u32
Conversion to u32 with overflow checking
fn as_u64(&self) -> u64
fn as_u64(&self) -> u64
Conversion to u64 with overflow checking
fn is_zero(&self) -> bool
fn is_zero(&self) -> bool
Returns
fn bits(&self) -> usize
fn bits(&self) -> usize
Return the least number of bits needed to represent the number
fn bit(&self, index: usize) -> bool
fn bit(&self, index: usize) -> bool
Return if specific bit is set
fn byte(&self, index: usize) -> u8
fn byte(&self, index: usize) -> u8
Return single byte
fn to_big_endian(&self, bytes: &mut [u8])
fn to_big_endian(&self, bytes: &mut [u8])
Convert to the sequence of bytes with a big endian
fn to_little_endian(&self, bytes: &mut [u8])
fn to_little_endian(&self, bytes: &mut [u8])
Convert to the sequence of bytes with a little endian
fn to_hex(&self) -> String
fn to_hex(&self) -> String
Convert to a non-zero-prefixed hex representation (not prefixed by 0x
).
fn exp10(n: usize) -> U256
fn exp10(n: usize) -> U256
Create Uint(10**n)
fn zero() -> U256
fn zero() -> U256
Returns new instance equalling zero.
fn one() -> U256
fn one() -> U256
Returns new instance equalling one.
fn max_value() -> U256
fn max_value() -> U256
Returns the largest value that can be represented by this integer type.
fn pow(self, expon: U256) -> U256
fn pow(self, expon: U256) -> U256
Fast exponentation by squaring https://en.wikipedia.org/wiki/Exponentiation_by_squaring
fn overflowing_pow(self, expon: U256) -> (U256, bool)
fn overflowing_pow(self, expon: U256) -> (U256, bool)
Fast exponentation by squaring https://en.wikipedia.org/wiki/Exponentiation_by_squaring
fn overflowing_add(self, other: U256) -> (U256, bool)
fn overflowing_add(self, other: U256) -> (U256, bool)
Optimized instructions
fn overflowing_sub(self, other: U256) -> (U256, bool)
fn overflowing_sub(self, other: U256) -> (U256, bool)
Subtract another Uint
from this returning result and possible overflow
fn overflowing_mul(self, other: U256) -> (U256, bool)
fn overflowing_mul(self, other: U256) -> (U256, bool)
Multiple this Uint
with other returning result and possible overflow
fn overflowing_div(self, other: U256) -> (U256, bool)
fn overflowing_div(self, other: U256) -> (U256, bool)
Divide this Uint
by other returning result and possible overflow
fn overflowing_rem(self, other: U256) -> (U256, bool)
fn overflowing_rem(self, other: U256) -> (U256, bool)
Returns reminder of division of this Uint
by other and possible overflow
fn overflowing_neg(self) -> (U256, bool)
fn overflowing_neg(self) -> (U256, bool)
Returns negation of this Uint
and overflow (always true)
impl Not for U256
impl Not for U256
type Output = U256
The resulting type after applying the !
operator.
fn not(self) -> U256
fn not(self) -> U256
Performs the unary !
operation.
impl Shl<usize> for U256
impl Shl<usize> for U256
type Output = U256
The resulting type after applying the <<
operator.
fn shl(self, shift: usize) -> U256
fn shl(self, shift: usize) -> U256
Performs the <<
operation.
impl Div<U256> for U256
impl Div<U256> for U256
type Output = U256
The resulting type after applying the /
operator.
fn div(self, other: U256) -> U256
fn div(self, other: U256) -> U256
Performs the /
operation.
impl From<isize> for U256
impl From<isize> for U256
impl From<U256> for U128
impl From<U256> for U128
impl From<u64> for U256
impl From<u64> for U256
impl<'a> From<&'a U256> for U512
impl<'a> From<&'a U256> for U512
impl From<usize> for U256
impl From<usize> for U256
impl From<u8> for U256
impl From<u8> for U256
impl From<U128> for U256
impl From<U128> for U256
impl From<U256> for u64
impl From<U256> for u64
impl From<U256> for u32
impl From<U256> for u32
impl From<i16> for U256
impl From<i16> for U256
impl From<i32> for U256
impl From<i32> for U256
impl<'a> From<&'a [u8]> for U256
impl<'a> From<&'a [u8]> for U256
impl From<u32> for U256
impl From<u32> for U256
impl From<i8> for U256
impl From<i8> for U256
impl From<&'static str> for U256
impl From<&'static str> for U256
impl From<U256> for U512
impl From<U256> for U512
impl From<i64> for U256
impl From<i64> for U256
impl From<u16> for U256
impl From<u16> for U256
impl<'a> From<&'a U512> for U256
impl<'a> From<&'a U512> for U256
impl From<U512> for U256
impl From<U512> for U256
impl PartialOrd<U256> for U256
impl PartialOrd<U256> for U256
fn partial_cmp(&self, other: &U256) -> Option<Ordering>
fn partial_cmp(&self, other: &U256) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Display for U256
impl Display for U256
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl HeapSizeOf for U256
impl HeapSizeOf for U256
fn heap_size_of_children(&self) -> usize
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:: measures, more or less); that space is handled by the implementation of HeapSizeOf for Box below. Read more
impl Copy for U256
impl Copy for U256
impl LowerHex for U256
impl LowerHex for U256
impl Clone for U256
impl Clone for U256
fn clone(&self) -> U256
fn clone(&self) -> U256
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl BitAnd<U256> for U256
impl BitAnd<U256> for U256
type Output = U256
The resulting type after applying the &
operator.
fn bitand(self, other: U256) -> U256
fn bitand(self, other: U256) -> U256
Performs the &
operation.
impl Add<U256> for U256
impl Add<U256> for U256
type Output = U256
The resulting type after applying the +
operator.
fn add(self, other: U256) -> U256
fn add(self, other: U256) -> U256
Performs the +
operation.
impl Rem<U256> for U256
impl Rem<U256> for U256
type Output = U256
The resulting type after applying the %
operator.
fn rem(self, other: U256) -> U256
fn rem(self, other: U256) -> U256
Performs the %
operation.
impl Default for U256
impl Default for U256
impl Shr<usize> for U256
impl Shr<usize> for U256
type Output = U256
The resulting type after applying the >>
operator.
fn shr(self, shift: usize) -> U256
fn shr(self, shift: usize) -> U256
Performs the >>
operation.
impl Sub<U256> for U256
impl Sub<U256> for U256
type Output = U256
The resulting type after applying the -
operator.
fn sub(self, other: U256) -> U256
fn sub(self, other: U256) -> U256
Performs the -
operation.
impl BitOr<U256> for U256
impl BitOr<U256> for U256
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> From for T
[src]
impl<T> From for T
impl<T> ToString for T where
T: Display + ?Sized,
[src]
impl<T> ToString for T where
T: Display + ?Sized,
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T
[src]
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<T> Erased for T
impl<T> Erased for T