Struct ethcontract::prelude::I256

source ·
pub struct I256(/* private fields */);
Expand description

Little-endian 256-bit signed integer.

Implementations§

source§

impl I256

source

pub const MAX: I256 = _

Maximum value.

source

pub const MIN: I256 = _

Minimum value.

source

pub const fn zero() -> Self

Zero (additive identity) of this type.

source

pub const fn one() -> Self

One (multiplicative identity) of this type.

source

pub const fn minus_one() -> Self

Minus one (multiplicative inverse) of this type.

source

pub const fn max_value() -> Self

The maximum value which can be inhabited by this type.

source

pub const fn min_value() -> Self

The minimum value which can be inhabited by this type.

source

pub fn from_raw(raw: U256) -> Self

Coerces an unsigned integer into a signed one. If the unsigned integer is greater than the greater than or equal to 1 << 255, then the result will overflow into a negative value.

source

pub fn into_raw(self) -> U256

Returns the signed integer as a unsigned integer. If the value of self negative, then the two’s complement of its absolute value will be returned.

source

pub fn low_i32(&self) -> i32

Conversion to i32

source

pub fn low_u32(&self) -> u32

Conversion to u32

source

pub fn low_i64(&self) -> i64

Conversion to i64

source

pub fn low_u64(&self) -> u64

Conversion to u64

source

pub fn low_i128(&self) -> i128

Conversion to i128

source

pub fn low_u128(&self) -> u128

Conversion to u128

source

pub fn low_isize(&self) -> isize

Conversion to i128

source

pub fn low_usize(&self) -> usize

Conversion to usize

source

pub fn as_i32(&self) -> i32

Conversion to i32 with overflow checking

§Panics

Panics if the number is outside the range [i32::MIN, i32::MAX].

source

pub fn as_u32(&self) -> u32

Conversion to u32 with overflow checking

§Panics

Panics if the number is outside the range [0, u32::MAX].

source

pub fn as_i64(&self) -> i64

Conversion to i64 with overflow checking

§Panics

Panics if the number is outside the range [i64::MIN, i64::MAX].

source

pub fn as_u64(&self) -> u64

Conversion to u64 with overflow checking

§Panics

Panics if the number is outside the range [0, u64::MAX].

source

pub fn as_i128(&self) -> i128

Conversion to i128 with overflow checking

§Panics

Panics if the number is outside the range [i128::MIN, i128::MAX].

source

pub fn as_u128(&self) -> u128

Conversion to u128 with overflow checking

§Panics

Panics if the number is outside the range [0, u128::MAX].

source

pub fn as_isize(&self) -> usize

Conversion to isize with overflow checking

§Panics

Panics if the number is outside the range [isize::MIN, isize::MAX].

source

pub fn as_usize(&self) -> usize

Conversion to usize with overflow checking

§Panics

Panics if the number is outside the range [0, usize::MAX].

source

pub fn from_dec_str(value: &str) -> Result<Self, ParseI256Error>

Convert from a decimal string.

source

pub fn from_hex_str(value: &str) -> Result<Self, ParseI256Error>

Convert from a hexadecimal string.

source

pub fn signum(self) -> Self

Returns the sign of the number.

source

pub fn is_positive(self) -> bool

Returns true if self is positive and false if the number is zero or negative.

source

pub fn is_negative(self) -> bool

Returns true if self is negative and false if the number is zero or negative.

source

pub fn is_zero(self) -> bool

Returns true if self is negative and false if the number is zero or positive.

source

pub fn abs(self) -> Self

Gets the absolute value.

§Panics

In debug mode, will panic if it overflows.

source

pub fn overflowing_abs(self) -> (Self, bool)

Computes the absolute value of self.

Returns a tuple of the absolute version of self along with a boolean indicating whether an overflow happened. If self is the minimum value (e.g., I256::MIN for values of type I256), then the minimum value will be returned again and true will be returned for an overflow happening.

source

pub fn checked_abs(self) -> Option<Self>

Checked absolute value. Computes self.abs(), returning None if self == MIN.

source

pub fn saturating_abs(self) -> Self

Saturating absolute value. Computes self.abs(), returning MAX if self == MIN instead of overflowing.

source

pub fn wrapping_abs(self) -> Self

Wrapping absolute value. Computes self.abs(), wrapping around at the boundary of the type.

source

pub fn overflowing_neg(self) -> (Self, bool)

Negates self, overflowing if this is equal to the minimum value.

Returns a tuple of the negated version of self along with a boolean indicating whether an overflow happened. If self is the minimum value, then the minimum value will be returned again and true will be returned for an overflow happening.

source

pub fn checked_neg(self) -> Option<Self>

Checked negation. Computes self.neg(), returning None if self == MIN.

source

pub fn saturating_neg(self) -> Self

Saturating negation. Computes self.neg(), returning MAX if self == MIN instead of overflowing.

source

pub fn wrapping_neg(self) -> Self

Wrapping negation. Computes self.neg(), returning MIN if self == MIN instead of overflowing.

source

pub fn bits(&self) -> u32

Return the least number of bits needed to represent the number.

source

pub fn bit(&self, index: usize) -> bool

Return if specific bit is set.

§Panics

Panics if index exceeds the bit width of the number.

source

pub fn count_ones(&self) -> u32

Returns the number of ones in the binary representation of self.

source

pub fn count_zeros(&self) -> u32

Returns the number of zeros in the binary representation of self.

source

pub fn leading_zeros(&self) -> u32

Returns the number of leading zeros in the binary representation of self.

source

pub fn trailing_zeros(&self) -> u32

Returns the number of leading zeros in the binary representation of self.

source

pub fn byte(&self, index: usize) -> u8

Return specific byte.

§Panics

Panics if index exceeds the byte width of the number.

source

pub fn to_big_endian(&self, bytes: &mut [u8])

Write to the slice in big-endian format.

source

pub fn to_little_endian(&self, bytes: &mut [u8])

Write to the slice in little-endian format.

source

pub fn overflowing_add(self, rhs: Self) -> (Self, 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.

source

pub fn checked_add(self, other: Self) -> Option<Self>

Checked addition. Returns None if overflow occurred.

source

pub fn saturating_add(self, other: Self) -> Self

Addition which saturates at the maximum value (Self::max_value()).

source

pub fn wrapping_add(self, other: Self) -> Self

Wrapping addition.

source

pub fn overflowing_sub(self, rhs: Self) -> (Self, 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.

source

pub fn checked_sub(self, other: Self) -> Option<Self>

Checked subtraction. Returns None if overflow occurred.

source

pub fn saturating_sub(self, other: Self) -> Self

Subtraction which saturates at zero.

source

pub fn wrapping_sub(self, other: Self) -> Self

Wrapping subtraction.

source

pub fn overflowing_mul(self, rhs: Self) -> (Self, bool)

Calculates self * 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.

source

pub fn checked_mul(self, other: Self) -> Option<Self>

Checked multiplication. Returns None if overflow occurred.

source

pub fn saturating_mul(self, rhs: Self) -> Self

Multiplication which saturates at the maximum value.

source

pub fn wrapping_mul(self, rhs: Self) -> Self

Wrapping multiplication.

source

pub fn overflowing_div(self, rhs: Self) -> (Self, bool)

Calculates self / rhs

Returns a tuple of the division along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned.

source

pub fn checked_div(self, rhs: Self) -> Option<Self>

Checked division. Returns None if overflow occurred or if rhs == 0.

source

pub fn saturating_div(self, rhs: Self) -> Self

Division which saturates at the maximum value.

source

pub fn wrapping_div(self, rhs: Self) -> Self

Wrapping division.

source

pub fn overflowing_rem(self, rhs: Self) -> (Self, bool)

Calculates self % rhs

Returns a tuple of the remainder along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned.

source

pub fn checked_rem(self, rhs: Self) -> Option<Self>

Checked remainder. Returns None if overflow occurred or rhs == 0

source

pub fn wrapping_rem(self, rhs: Self) -> Self

Wrapping remainder. Returns the result of the operation % regardless of whether or not the division overflowed.

source

pub fn div_euclid(self, rhs: Self) -> Self

Calculates the quotient of Euclidean division of self by rhs.

This computes the integer n such that self = n * rhs + self.rem_euclid(rhs), with 0 <= self.rem_euclid(rhs) < rhs. In other words, the result is self / rhs rounded to the integer n such that self >= n * rhs:

  • If self > 0, this is equal to round towards zero (the default in Rust);
  • If self < 0, this is equal to round towards +/- infinity.
source

pub fn rem_euclid(self, rhs: Self) -> Self

Calculates the least non-negative remainder of self (mod rhs). This is done as if by the Euclidean division algorithm given r = self.rem_euclid(rhs), self = rhs * self.div_euclid(rhs) + r, and 0 <= r < abs(rhs).

source

pub fn overflowing_div_euclid(self, rhs: Self) -> (Self, bool)

Calculates the quotient of Euclidean division self.div_euclid(rhs). Returns a tuple of the divisor along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would occur then self is returned.

source

pub fn checked_div_euclid(self, rhs: Self) -> Option<Self>

Checked Euclidean division. Computes self.div_euclid(rhs), returning None if rhs == 0 or the division results in overflow.

source

pub fn wrapping_div_euclid(self, rhs: Self) -> Self

Wrapping Euclidean division. Computes self.div_euclid(rhs), wrapping around at the boundary of the type. Wrapping only occurs in MIN / -1 on a signed type (where MIN is the negative minimal value for the type). This is equivalent to -MIN, a positive value that is too large to represent in the type. In this case, this method returns MIN itself.

source

pub fn overflowing_rem_euclid(self, rhs: Self) -> (Self, bool)

Overflowing Euclidean remainder. Calculates self.rem_euclid(rhs). Returns a tuple of the remainder after dividing along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would occur then 0 is returned. Panics if rhs == 0

source

pub fn wrapping_rem_euclid(self, rhs: Self) -> Self

Wrapping Euclidean remainder. Computes self.rem_euclid(rhs), wrapping around at the boundary of the type. Wrapping will only occur in MIN % -1 on a signed type (where MIN is the negative minimal value for the type). In this case, this method returns 0. Panics when rhs == 0

source

pub fn checked_rem_euclid(self, rhs: Self) -> Option<Self>

Checked Euclidean remainder. Computes self.rem_euclid(rhs), returning None if rhs == 0 or the division results in overflow.

source

pub fn exp10(n: usize) -> Self

Create 10**n as this type.

§Panics

Panics if the result overflows the type.

source

pub fn pow(self, exp: u32) -> Self

Raise self to the power of exp.

§Panics

Panics if the result overflows the type in debug mode.

source

pub fn overflowing_pow(self, exp: u32) -> (Self, bool)

Raises self to the power of exp.

Returns a tuple of the exponentiation along with a bool indicating whether an overflow happened.

source

pub fn checked_pow(self, exp: u32) -> Option<Self>

Raises self to the power of exp. Returns None if overflow occurred.

source

pub fn saturating_pow(self, exp: u32) -> Self

Raises self to the power of exp, saturating at the numeric bounds instead of overflowing.

source

pub fn wrapping_pow(self, exp: u32) -> Self

Wrapping powolute value. Computes self.pow(), wrapping around at the boundary of the type.

Trait Implementations§

source§

impl Add for I256

§

type Output = I256

The resulting type after applying the + operator.
source§

fn add(self, rhs: Self) -> Self::Output

Performs the + operation. Read more
source§

impl AddAssign for I256

source§

fn add_assign(&mut self, rhs: Self)

Performs the += operation. Read more
source§

impl BitAnd for I256

§

type Output = I256

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
source§

impl BitAndAssign for I256

source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
source§

impl BitOr for I256

§

type Output = I256

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
source§

impl BitOrAssign for I256

source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
source§

impl BitXor for I256

§

type Output = I256

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
source§

impl BitXorAssign for I256

source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
source§

impl Clone for I256

source§

fn clone(&self) -> I256

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for I256

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for I256

source§

fn default() -> I256

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for I256

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Display for I256

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Div for I256

§

type Output = I256

The resulting type after applying the / operator.
source§

fn div(self, rhs: Self) -> Self::Output

Performs the / operation. Read more
source§

impl DivAssign for I256

source§

fn div_assign(&mut self, rhs: Self)

Performs the /= operation. Read more
source§

impl From<i128> for I256

source§

fn from(value: i128) -> Self

Converts to this type from the input type.
source§

impl From<i16> for I256

source§

fn from(value: i16) -> Self

Converts to this type from the input type.
source§

impl From<i32> for I256

source§

fn from(value: i32) -> Self

Converts to this type from the input type.
source§

impl From<i64> for I256

source§

fn from(value: i64) -> Self

Converts to this type from the input type.
source§

impl From<i8> for I256

source§

fn from(value: i8) -> Self

Converts to this type from the input type.
source§

impl From<isize> for I256

source§

fn from(value: isize) -> Self

Converts to this type from the input type.
source§

impl From<u128> for I256

source§

fn from(value: u128) -> Self

Converts to this type from the input type.
source§

impl From<u16> for I256

source§

fn from(value: u16) -> Self

Converts to this type from the input type.
source§

impl From<u32> for I256

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl From<u64> for I256

source§

fn from(value: u64) -> Self

Converts to this type from the input type.
source§

impl From<u8> for I256

source§

fn from(value: u8) -> Self

Converts to this type from the input type.
source§

impl From<usize> for I256

source§

fn from(value: usize) -> Self

Converts to this type from the input type.
source§

impl FromStr for I256

§

type Err = ParseI256Error

The associated error which can be returned from parsing.
source§

fn from_str(value: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more
source§

impl Hash for I256

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl LowerHex for I256

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Mul for I256

§

type Output = I256

The resulting type after applying the * operator.
source§

fn mul(self, rhs: Self) -> Self::Output

Performs the * operation. Read more
source§

impl MulAssign for I256

source§

fn mul_assign(&mut self, rhs: Self)

Performs the *= operation. Read more
source§

impl Neg for I256

§

type Output = I256

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl Not for I256

§

type Output = I256

The resulting type after applying the ! operator.
source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
source§

impl Ord for I256

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for I256

source§

fn eq(&self, other: &I256) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for I256

source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

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
source§

impl Product for I256

source§

fn product<I>(iter: I) -> Self
where I: Iterator<Item = Self>,

Method which takes an iterator and generates Self from the elements by multiplying the items.
source§

impl Rem for I256

§

type Output = I256

The resulting type after applying the % operator.
source§

fn rem(self, rhs: Self) -> Self::Output

Performs the % operation. Read more
source§

impl RemAssign for I256

source§

fn rem_assign(&mut self, rhs: Self)

Performs the %= operation. Read more
source§

impl Serialize for I256

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Shl<U256> for I256

§

type Output = I256

The resulting type after applying the << operator.
source§

fn shl(self, rhs: U256) -> Self::Output

Performs the << operation. Read more
source§

impl Shl<i128> for I256

§

type Output = I256

The resulting type after applying the << operator.
source§

fn shl(self, rhs: i128) -> Self::Output

Performs the << operation. Read more
source§

impl Shl<i16> for I256

§

type Output = I256

The resulting type after applying the << operator.
source§

fn shl(self, rhs: i16) -> Self::Output

Performs the << operation. Read more
source§

impl Shl<i32> for I256

§

type Output = I256

The resulting type after applying the << operator.
source§

fn shl(self, rhs: i32) -> Self::Output

Performs the << operation. Read more
source§

impl Shl<i64> for I256

§

type Output = I256

The resulting type after applying the << operator.
source§

fn shl(self, rhs: i64) -> Self::Output

Performs the << operation. Read more
source§

impl Shl<i8> for I256

§

type Output = I256

The resulting type after applying the << operator.
source§

fn shl(self, rhs: i8) -> Self::Output

Performs the << operation. Read more
source§

impl Shl<isize> for I256

§

type Output = I256

The resulting type after applying the << operator.
source§

fn shl(self, rhs: isize) -> Self::Output

Performs the << operation. Read more
source§

impl Shl<u128> for I256

§

type Output = I256

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u128) -> Self::Output

Performs the << operation. Read more
source§

impl Shl<u16> for I256

§

type Output = I256

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u16) -> Self::Output

Performs the << operation. Read more
source§

impl Shl<u32> for I256

§

type Output = I256

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u32) -> Self::Output

Performs the << operation. Read more
source§

impl Shl<u64> for I256

§

type Output = I256

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u64) -> Self::Output

Performs the << operation. Read more
source§

impl Shl<u8> for I256

§

type Output = I256

The resulting type after applying the << operator.
source§

fn shl(self, rhs: u8) -> Self::Output

Performs the << operation. Read more
source§

impl Shl<usize> for I256

§

type Output = I256

The resulting type after applying the << operator.
source§

fn shl(self, rhs: usize) -> Self::Output

Performs the << operation. Read more
source§

impl Shl for I256

§

type Output = I256

The resulting type after applying the << operator.
source§

fn shl(self, rhs: I256) -> Self::Output

Performs the << operation. Read more
source§

impl ShlAssign<U256> for I256

source§

fn shl_assign(&mut self, rhs: U256)

Performs the <<= operation. Read more
source§

impl ShlAssign<i128> for I256

source§

fn shl_assign(&mut self, rhs: i128)

Performs the <<= operation. Read more
source§

impl ShlAssign<i16> for I256

source§

fn shl_assign(&mut self, rhs: i16)

Performs the <<= operation. Read more
source§

impl ShlAssign<i32> for I256

source§

fn shl_assign(&mut self, rhs: i32)

Performs the <<= operation. Read more
source§

impl ShlAssign<i64> for I256

source§

fn shl_assign(&mut self, rhs: i64)

Performs the <<= operation. Read more
source§

impl ShlAssign<i8> for I256

source§

fn shl_assign(&mut self, rhs: i8)

Performs the <<= operation. Read more
source§

impl ShlAssign<isize> for I256

source§

fn shl_assign(&mut self, rhs: isize)

Performs the <<= operation. Read more
source§

impl ShlAssign<u128> for I256

source§

fn shl_assign(&mut self, rhs: u128)

Performs the <<= operation. Read more
source§

impl ShlAssign<u16> for I256

source§

fn shl_assign(&mut self, rhs: u16)

Performs the <<= operation. Read more
source§

impl ShlAssign<u32> for I256

source§

fn shl_assign(&mut self, rhs: u32)

Performs the <<= operation. Read more
source§

impl ShlAssign<u64> for I256

source§

fn shl_assign(&mut self, rhs: u64)

Performs the <<= operation. Read more
source§

impl ShlAssign<u8> for I256

source§

fn shl_assign(&mut self, rhs: u8)

Performs the <<= operation. Read more
source§

impl ShlAssign<usize> for I256

source§

fn shl_assign(&mut self, rhs: usize)

Performs the <<= operation. Read more
source§

impl ShlAssign for I256

source§

fn shl_assign(&mut self, rhs: I256)

Performs the <<= operation. Read more
source§

impl Shr<U256> for I256

§

type Output = I256

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: U256) -> Self::Output

Performs the >> operation. Read more
source§

impl Shr<i128> for I256

§

type Output = I256

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: i128) -> Self::Output

Performs the >> operation. Read more
source§

impl Shr<i16> for I256

§

type Output = I256

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: i16) -> Self::Output

Performs the >> operation. Read more
source§

impl Shr<i32> for I256

§

type Output = I256

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: i32) -> Self::Output

Performs the >> operation. Read more
source§

impl Shr<i64> for I256

§

type Output = I256

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: i64) -> Self::Output

Performs the >> operation. Read more
source§

impl Shr<i8> for I256

§

type Output = I256

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: i8) -> Self::Output

Performs the >> operation. Read more
source§

impl Shr<isize> for I256

§

type Output = I256

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: isize) -> Self::Output

Performs the >> operation. Read more
source§

impl Shr<u128> for I256

§

type Output = I256

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u128) -> Self::Output

Performs the >> operation. Read more
source§

impl Shr<u16> for I256

§

type Output = I256

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u16) -> Self::Output

Performs the >> operation. Read more
source§

impl Shr<u32> for I256

§

type Output = I256

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u32) -> Self::Output

Performs the >> operation. Read more
source§

impl Shr<u64> for I256

§

type Output = I256

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u64) -> Self::Output

Performs the >> operation. Read more
source§

impl Shr<u8> for I256

§

type Output = I256

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: u8) -> Self::Output

Performs the >> operation. Read more
source§

impl Shr<usize> for I256

§

type Output = I256

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: usize) -> Self::Output

Performs the >> operation. Read more
source§

impl Shr for I256

§

type Output = I256

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: I256) -> Self::Output

Performs the >> operation. Read more
source§

impl ShrAssign<U256> for I256

source§

fn shr_assign(&mut self, rhs: U256)

Performs the >>= operation. Read more
source§

impl ShrAssign<i128> for I256

source§

fn shr_assign(&mut self, rhs: i128)

Performs the >>= operation. Read more
source§

impl ShrAssign<i16> for I256

source§

fn shr_assign(&mut self, rhs: i16)

Performs the >>= operation. Read more
source§

impl ShrAssign<i32> for I256

source§

fn shr_assign(&mut self, rhs: i32)

Performs the >>= operation. Read more
source§

impl ShrAssign<i64> for I256

source§

fn shr_assign(&mut self, rhs: i64)

Performs the >>= operation. Read more
source§

impl ShrAssign<i8> for I256

source§

fn shr_assign(&mut self, rhs: i8)

Performs the >>= operation. Read more
source§

impl ShrAssign<isize> for I256

source§

fn shr_assign(&mut self, rhs: isize)

Performs the >>= operation. Read more
source§

impl ShrAssign<u128> for I256

source§

fn shr_assign(&mut self, rhs: u128)

Performs the >>= operation. Read more
source§

impl ShrAssign<u16> for I256

source§

fn shr_assign(&mut self, rhs: u16)

Performs the >>= operation. Read more
source§

impl ShrAssign<u32> for I256

source§

fn shr_assign(&mut self, rhs: u32)

Performs the >>= operation. Read more
source§

impl ShrAssign<u64> for I256

source§

fn shr_assign(&mut self, rhs: u64)

Performs the >>= operation. Read more
source§

impl ShrAssign<u8> for I256

source§

fn shr_assign(&mut self, rhs: u8)

Performs the >>= operation. Read more
source§

impl ShrAssign<usize> for I256

source§

fn shr_assign(&mut self, rhs: usize)

Performs the >>= operation. Read more
source§

impl ShrAssign for I256

source§

fn shr_assign(&mut self, rhs: I256)

Performs the >>= operation. Read more
source§

impl Sub for I256

§

type Output = I256

The resulting type after applying the - operator.
source§

fn sub(self, rhs: Self) -> Self::Output

Performs the - operation. Read more
source§

impl SubAssign for I256

source§

fn sub_assign(&mut self, rhs: Self)

Performs the -= operation. Read more
source§

impl Sum for I256

source§

fn sum<I>(iter: I) -> Self
where I: Iterator<Item = Self>,

Method which takes an iterator and generates Self from the elements by “summing up” the items.
source§

impl Tokenize for I256

source§

fn from_token(token: Token) -> Result<Self, Error>

Convert self into token.
source§

fn into_token(self) -> Token

Convert token into Self.
source§

impl TryFrom<I256> for U256

§

type Error = TryFromBigIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: I256) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<I256> for i128

§

type Error = TryFromBigIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: I256) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<I256> for i16

§

type Error = TryFromBigIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: I256) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<I256> for i32

§

type Error = TryFromBigIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: I256) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<I256> for i64

§

type Error = TryFromBigIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: I256) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<I256> for i8

§

type Error = TryFromBigIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: I256) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<I256> for isize

§

type Error = TryFromBigIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: I256) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<I256> for u128

§

type Error = TryFromBigIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: I256) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<I256> for u16

§

type Error = TryFromBigIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: I256) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<I256> for u32

§

type Error = TryFromBigIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: I256) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<I256> for u64

§

type Error = TryFromBigIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: I256) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<I256> for u8

§

type Error = TryFromBigIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: I256) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<I256> for usize

§

type Error = TryFromBigIntError

The type returned in the event of a conversion error.
source§

fn try_from(value: I256) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl TryFrom<U256> for I256

§

type Error = TryFromBigIntError

The type returned in the event of a conversion error.
source§

fn try_from(from: U256) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl UpperHex for I256

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for I256

source§

impl Eq for I256

source§

impl StructuralPartialEq for I256

Auto Trait Implementations§

§

impl Freeze for I256

§

impl RefUnwindSafe for I256

§

impl Send for I256

§

impl Sync for I256

§

impl Unpin for I256

§

impl UnwindSafe for I256

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,