Struct 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() -> I256

Zero (additive identity) of this type.

Source

pub const fn one() -> I256

One (multiplicative identity) of this type.

Source

pub const fn minus_one() -> I256

Minus one (multiplicative inverse) of this type.

Source

pub const fn max_value() -> I256

The maximum value which can be inhabited by this type.

Source

pub const fn min_value() -> I256

The minimum value which can be inhabited by this type.

Source

pub fn from_raw(raw: U256) -> I256

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<I256, ParseI256Error>

Convert from a decimal string.

Source

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

Convert from a hexadecimal string.

Source

pub fn signum(self) -> I256

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) -> I256

Gets the absolute value.

§Panics

In debug mode, will panic if it overflows.

Source

pub fn overflowing_abs(self) -> (I256, 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<I256>

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

Source

pub fn saturating_abs(self) -> I256

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

Source

pub fn wrapping_abs(self) -> I256

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

Source

pub fn overflowing_neg(self) -> (I256, 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<I256>

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

Source

pub fn saturating_neg(self) -> I256

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

Source

pub fn wrapping_neg(self) -> I256

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: I256) -> (I256, 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: I256) -> Option<I256>

Checked addition. Returns None if overflow occurred.

Source

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

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

Source

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

Wrapping addition.

Source

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

Checked subtraction. Returns None if overflow occurred.

Source

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

Subtraction which saturates at zero.

Source

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

Wrapping subtraction.

Source

pub fn overflowing_mul(self, rhs: I256) -> (I256, 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: I256) -> Option<I256>

Checked multiplication. Returns None if overflow occurred.

Source

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

Multiplication which saturates at the maximum value.

Source

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

Wrapping multiplication.

Source

pub fn overflowing_div(self, rhs: I256) -> (I256, 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: I256) -> Option<I256>

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

Source

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

Division which saturates at the maximum value.

Source

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

Wrapping division.

Source

pub fn overflowing_rem(self, rhs: I256) -> (I256, 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: I256) -> Option<I256>

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

Source

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

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

Source

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

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: I256) -> I256

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: I256) -> (I256, 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: I256) -> Option<I256>

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: I256) -> I256

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: I256) -> (I256, 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: I256) -> I256

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: I256) -> Option<I256>

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) -> I256

Create 10**n as this type.

§Panics

Panics if the result overflows the type.

Source

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

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) -> (I256, 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<I256>

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

Source

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

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

Source

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

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

Trait Implementations§

Source§

impl Add for I256

Source§

type Output = I256

The resulting type after applying the + operator.
Source§

fn add(self, rhs: I256) -> <I256 as Add>::Output

Performs the + operation. Read more
Source§

impl AddAssign for I256

Source§

fn add_assign(&mut self, rhs: I256)

Performs the += operation. Read more
Source§

impl BitAnd for I256

Source§

type Output = I256

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: I256) -> <I256 as BitAnd>::Output

Performs the & operation. Read more
Source§

impl BitAndAssign for I256

Source§

fn bitand_assign(&mut self, rhs: I256)

Performs the &= operation. Read more
Source§

impl BitOr for I256

Source§

type Output = I256

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: I256) -> <I256 as BitOr>::Output

Performs the | operation. Read more
Source§

impl BitOrAssign for I256

Source§

fn bitor_assign(&mut self, rhs: I256)

Performs the |= operation. Read more
Source§

impl BitXor for I256

Source§

type Output = I256

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: I256) -> <I256 as BitXor>::Output

Performs the ^ operation. Read more
Source§

impl BitXorAssign for I256

Source§

fn bitxor_assign(&mut self, rhs: I256)

Performs the ^= operation. Read more
Source§

impl Clone for I256

Source§

fn clone(&self) -> I256

Returns a duplicate 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<(), Error>

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<I256, <__D as Deserializer<'de>>::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<(), Error>

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

impl Div for I256

Source§

type Output = I256

The resulting type after applying the / operator.
Source§

fn div(self, rhs: I256) -> <I256 as Div>::Output

Performs the / operation. Read more
Source§

impl DivAssign for I256

Source§

fn div_assign(&mut self, rhs: I256)

Performs the /= operation. Read more
Source§

impl From<i128> for I256

Source§

fn from(value: i128) -> I256

Converts to this type from the input type.
Source§

impl From<i16> for I256

Source§

fn from(value: i16) -> I256

Converts to this type from the input type.
Source§

impl From<i32> for I256

Source§

fn from(value: i32) -> I256

Converts to this type from the input type.
Source§

impl From<i64> for I256

Source§

fn from(value: i64) -> I256

Converts to this type from the input type.
Source§

impl From<i8> for I256

Source§

fn from(value: i8) -> I256

Converts to this type from the input type.
Source§

impl From<isize> for I256

Source§

fn from(value: isize) -> I256

Converts to this type from the input type.
Source§

impl From<u128> for I256

Source§

fn from(value: u128) -> I256

Converts to this type from the input type.
Source§

impl From<u16> for I256

Source§

fn from(value: u16) -> I256

Converts to this type from the input type.
Source§

impl From<u32> for I256

Source§

fn from(value: u32) -> I256

Converts to this type from the input type.
Source§

impl From<u64> for I256

Source§

fn from(value: u64) -> I256

Converts to this type from the input type.
Source§

impl From<u8> for I256

Source§

fn from(value: u8) -> I256

Converts to this type from the input type.
Source§

impl From<usize> for I256

Source§

fn from(value: usize) -> I256

Converts to this type from the input type.
Source§

impl FromStr for I256

Source§

type Err = ParseI256Error

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

fn from_str(value: &str) -> Result<I256, <I256 as FromStr>::Err>

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

impl Hash for I256

Source§

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

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<(), Error>

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

impl Mul for I256

Source§

type Output = I256

The resulting type after applying the * operator.
Source§

fn mul(self, rhs: I256) -> <I256 as Mul>::Output

Performs the * operation. Read more
Source§

impl MulAssign for I256

Source§

fn mul_assign(&mut self, rhs: I256)

Performs the *= operation. Read more
Source§

impl Neg for I256

Source§

type Output = I256

The resulting type after applying the - operator.
Source§

fn neg(self) -> <I256 as Neg>::Output

Performs the unary - operation. Read more
Source§

impl Not for I256

Source§

type Output = I256

The resulting type after applying the ! operator.
Source§

fn not(self) -> <I256 as Not>::Output

Performs the unary ! operation. Read more
Source§

impl Ord for I256

Source§

fn cmp(&self, other: &I256) -> 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,

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

impl PartialEq for I256

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

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

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: &I256) -> 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

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

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

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

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) -> I256
where I: Iterator<Item = I256>,

Takes an iterator and generates Self from the elements by multiplying the items.
Source§

impl Rem for I256

Source§

type Output = I256

The resulting type after applying the % operator.
Source§

fn rem(self, rhs: I256) -> <I256 as Rem>::Output

Performs the % operation. Read more
Source§

impl RemAssign for I256

Source§

fn rem_assign(&mut self, rhs: I256)

Performs the %= operation. Read more
Source§

impl Serialize for I256

Source§

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

impl Shl<U256> for I256

Source§

type Output = I256

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

fn shl(self, rhs: U256) -> <I256 as Shl<U256>>::Output

Performs the << operation. Read more
Source§

impl Shl<i128> for I256

Source§

type Output = I256

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

fn shl(self, rhs: i128) -> <I256 as Shl<i128>>::Output

Performs the << operation. Read more
Source§

impl Shl<i16> for I256

Source§

type Output = I256

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

fn shl(self, rhs: i16) -> <I256 as Shl<i16>>::Output

Performs the << operation. Read more
Source§

impl Shl<i32> for I256

Source§

type Output = I256

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

fn shl(self, rhs: i32) -> <I256 as Shl<i32>>::Output

Performs the << operation. Read more
Source§

impl Shl<i64> for I256

Source§

type Output = I256

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

fn shl(self, rhs: i64) -> <I256 as Shl<i64>>::Output

Performs the << operation. Read more
Source§

impl Shl<i8> for I256

Source§

type Output = I256

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

fn shl(self, rhs: i8) -> <I256 as Shl<i8>>::Output

Performs the << operation. Read more
Source§

impl Shl<isize> for I256

Source§

type Output = I256

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

fn shl(self, rhs: isize) -> <I256 as Shl<isize>>::Output

Performs the << operation. Read more
Source§

impl Shl<u128> for I256

Source§

type Output = I256

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

fn shl(self, rhs: u128) -> <I256 as Shl<u128>>::Output

Performs the << operation. Read more
Source§

impl Shl<u16> for I256

Source§

type Output = I256

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

fn shl(self, rhs: u16) -> <I256 as Shl<u16>>::Output

Performs the << operation. Read more
Source§

impl Shl<u32> for I256

Source§

type Output = I256

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

fn shl(self, rhs: u32) -> <I256 as Shl<u32>>::Output

Performs the << operation. Read more
Source§

impl Shl<u64> for I256

Source§

type Output = I256

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

fn shl(self, rhs: u64) -> <I256 as Shl<u64>>::Output

Performs the << operation. Read more
Source§

impl Shl<u8> for I256

Source§

type Output = I256

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

fn shl(self, rhs: u8) -> <I256 as Shl<u8>>::Output

Performs the << operation. Read more
Source§

impl Shl<usize> for I256

Source§

type Output = I256

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

fn shl(self, rhs: usize) -> <I256 as Shl<usize>>::Output

Performs the << operation. Read more
Source§

impl Shl for I256

Source§

type Output = I256

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

fn shl(self, rhs: I256) -> <I256 as Shl>::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

Source§

type Output = I256

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

fn shr(self, rhs: U256) -> <I256 as Shr<U256>>::Output

Performs the >> operation. Read more
Source§

impl Shr<i128> for I256

Source§

type Output = I256

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

fn shr(self, rhs: i128) -> <I256 as Shr<i128>>::Output

Performs the >> operation. Read more
Source§

impl Shr<i16> for I256

Source§

type Output = I256

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

fn shr(self, rhs: i16) -> <I256 as Shr<i16>>::Output

Performs the >> operation. Read more
Source§

impl Shr<i32> for I256

Source§

type Output = I256

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

fn shr(self, rhs: i32) -> <I256 as Shr<i32>>::Output

Performs the >> operation. Read more
Source§

impl Shr<i64> for I256

Source§

type Output = I256

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

fn shr(self, rhs: i64) -> <I256 as Shr<i64>>::Output

Performs the >> operation. Read more
Source§

impl Shr<i8> for I256

Source§

type Output = I256

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

fn shr(self, rhs: i8) -> <I256 as Shr<i8>>::Output

Performs the >> operation. Read more
Source§

impl Shr<isize> for I256

Source§

type Output = I256

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

fn shr(self, rhs: isize) -> <I256 as Shr<isize>>::Output

Performs the >> operation. Read more
Source§

impl Shr<u128> for I256

Source§

type Output = I256

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

fn shr(self, rhs: u128) -> <I256 as Shr<u128>>::Output

Performs the >> operation. Read more
Source§

impl Shr<u16> for I256

Source§

type Output = I256

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

fn shr(self, rhs: u16) -> <I256 as Shr<u16>>::Output

Performs the >> operation. Read more
Source§

impl Shr<u32> for I256

Source§

type Output = I256

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

fn shr(self, rhs: u32) -> <I256 as Shr<u32>>::Output

Performs the >> operation. Read more
Source§

impl Shr<u64> for I256

Source§

type Output = I256

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

fn shr(self, rhs: u64) -> <I256 as Shr<u64>>::Output

Performs the >> operation. Read more
Source§

impl Shr<u8> for I256

Source§

type Output = I256

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

fn shr(self, rhs: u8) -> <I256 as Shr<u8>>::Output

Performs the >> operation. Read more
Source§

impl Shr<usize> for I256

Source§

type Output = I256

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

fn shr(self, rhs: usize) -> <I256 as Shr<usize>>::Output

Performs the >> operation. Read more
Source§

impl Shr for I256

Source§

type Output = I256

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

fn shr(self, rhs: I256) -> <I256 as Shr>::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

Source§

type Output = I256

The resulting type after applying the - operator.
Source§

fn sub(self, rhs: I256) -> <I256 as Sub>::Output

Performs the - operation. Read more
Source§

impl SubAssign for I256

Source§

fn sub_assign(&mut self, rhs: I256)

Performs the -= operation. Read more
Source§

impl Sum for I256

Source§

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

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<I256, Error>

Convert self into token.
Source§

fn into_token(self) -> Token

Convert token into Self.
Source§

impl TryFrom<I256> for U256

Source§

type Error = TryFromBigIntError

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

fn try_from(value: I256) -> Result<U256, <U256 as TryFrom<I256>>::Error>

Performs the conversion.
Source§

impl TryFrom<U256> for I256

Source§

type Error = TryFromBigIntError

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

fn try_from(from: U256) -> Result<I256, <I256 as TryFrom<U256>>::Error>

Performs the conversion.
Source§

impl UpperHex for I256

Source§

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

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<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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

Source§

type Output = T

Should always be Self
Source§

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

Source§

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§

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>,

Source§

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>,

Source§

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>,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T, Rhs, Output> GroupOps<Rhs, Output> for T
where T: Add<Rhs, Output = Output> + Sub<Rhs, Output = Output> + AddAssign<Rhs> + SubAssign<Rhs>,

Source§

impl<T, Rhs> NumAssignOps<Rhs> for T
where T: AddAssign<Rhs> + SubAssign<Rhs> + MulAssign<Rhs> + DivAssign<Rhs> + RemAssign<Rhs>,

Source§

impl<T, Rhs, Output> NumOps<Rhs, Output> for T
where T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,

Source§

impl<T, Rhs, Output> ScalarMul<Rhs, Output> for T
where T: Mul<Rhs, Output = Output> + MulAssign<Rhs>,