soroban_env_common::num

Struct I256

Source
#[repr(transparent)]
pub struct I256(pub [i128; 2]);
Expand description

A 256-bit signed integer type.

Tuple Fields§

§0: [i128; 2]

Implementations§

Source§

impl I256

Source

pub const MIN: I256

The smallest value that can be represented by this integer type, -2255.

§Examples

Basic usage:

assert_eq!(
    I256::MIN.to_string(),
    "-57896044618658097711785492504343953926634992332820282019728792003956564819968",
);
Source

pub const MAX: I256

The largest value that can be represented by this integer type, 2255 - 1.

§Examples

Basic usage:

assert_eq!(
    I256::MAX.to_string(),
    "57896044618658097711785492504343953926634992332820282019728792003956564819967",
);
Source

pub const BITS: u32 = 256u32

The size of this integer type in bits.

§Examples
assert_eq!(I256::BITS, 256);
Source

pub fn from_str_radix(src: &str, radix: u32) -> Result<I256, ParseIntError>

Converts a string slice in a given base to an integer.

The string is expected to be an optional + or - sign followed by digits. Leading and trailing whitespace represent an error. Digits are a subset of these characters, depending on radix:

  • 0-9
  • a-z
  • A-Z
§Panics

This function panics if radix is not in the range from 2 to 36.

§Examples

Basic usage:

assert_eq!(I256::from_str_radix("A", 16), Ok(I256::new(10)));
Source

pub const fn count_ones(self) -> u32

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

§Examples

Basic usage:

let n = I256::new(0b100_0000);

assert_eq!(n.count_ones(), 1);
Source

pub const fn count_zeros(self) -> u32

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

§Examples

Basic usage:

assert_eq!(I256::MAX.count_zeros(), 1);
Source

pub fn leading_zeros(self) -> u32

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

§Examples

Basic usage:

let n = I256::new(-1);

assert_eq!(n.leading_zeros(), 0);
Source

pub fn trailing_zeros(self) -> u32

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

§Examples

Basic usage:

let n = I256::new(-4);

assert_eq!(n.trailing_zeros(), 2);
Source

pub fn leading_ones(self) -> u32

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

§Examples

Basic usage:

let n = I256::new(-1);

assert_eq!(n.leading_ones(), 256);
Source

pub fn trailing_ones(self) -> u32

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

§Examples

Basic usage:

let n = I256::new(3);

assert_eq!(n.trailing_ones(), 2);
Source

pub fn rotate_left(self, n: u32) -> I256

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 the << shifting operator!

§Examples

Basic usage:

let n = I256::from_words(
    0x13f40000000000000000000000000000,
    0x00000000000000000000000000004f76,
);
let m = I256::new(0x4f7613f4);

assert_eq!(n.rotate_left(16), m);
Source

pub fn rotate_right(self, n: u32) -> I256

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 the >> shifting operator!

§Examples

Basic usage:

let n = I256::new(0x4f7613f4);
let m = I256::from_words(
    0x13f40000000000000000000000000000,
    0x00000000000000000000000000004f76,
);

assert_eq!(n.rotate_right(16), m);
Source

pub const fn swap_bytes(self) -> I256

Reverses the byte order of the integer.

§Examples

Basic usage:

let n = I256::from_words(
    0x00010203_04050607_08090a0b_0c0d0e0f,
    0x10111213_14151617_18191a1b_1c1d1e1f,
);

assert_eq!(
    n.swap_bytes(),
    I256::from_words(
        0x1f1e1d1c_1b1a1918_17161514_13121110,
        0x0f0e0d0c_0b0a0908_07060504_03020100,
    ),
);
Source

pub const fn reverse_bits(self) -> I256

Reverses the order of bits in the integer. The least significant bit becomes the most significant bit, second least-significant bit becomes second most-significant bit, etc.

§Examples

Basic usage:

let n = I256::from_words(
    0x00010203_04050607_08090a0b_0c0d0e0f,
    0x10111213_14151617_18191a1b_1c1d1e1f,
);

assert_eq!(
    n.reverse_bits(),
    I256::from_words(
        0xf878b838_d8589818_e868a828_c8488808_u128 as _,
        0xf070b030_d0509010_e060a020_c0408000_u128 as _,
    ),
);
Source

pub const fn from_be(x: I256) -> I256

Converts an integer from big endian to the target’s endianness.

On big endian this is a no-op. On little endian the bytes are swapped.

§Examples

Basic usage:

let n = I256::new(0x1A);

if cfg!(target_endian = "big") {
    assert_eq!(I256::from_be(n), n)
} else {
    assert_eq!(I256::from_be(n), n.swap_bytes())
}
Source

pub const fn from_le(x: I256) -> I256

Converts an integer from little endian to the target’s endianness.

On little endian this is a no-op. On big endian the bytes are swapped.

§Examples

Basic usage:

let n = I256::new(0x1A);

if cfg!(target_endian = "little") {
    assert_eq!(I256::from_le(n), n)
} else {
    assert_eq!(I256::from_le(n), n.swap_bytes())
}
Source

pub const fn to_be(self) -> I256

Converts self to big endian from the target’s endianness.

On big endian this is a no-op. On little endian the bytes are swapped.

§Examples

Basic usage:

let n = I256::new(0x1A);

if cfg!(target_endian = "big") {
    assert_eq!(n.to_be(), n)
} else {
    assert_eq!(n.to_be(), n.swap_bytes())
}
Source

pub const fn to_le(self) -> I256

Converts self to little endian from the target’s endianness.

On little endian this is a no-op. On big endian the bytes are swapped.

§Examples

Basic usage:

let n = I256::new(0x1A);

if cfg!(target_endian = "little") {
    assert_eq!(n.to_le(), n)
} else {
    assert_eq!(n.to_le(), n.swap_bytes())
}
Source

pub fn checked_add(self, rhs: I256) -> Option<I256>

Checked integer addition. Computes self + rhs, returning None if overflow occurred.

§Examples

Basic usage:

assert_eq!((I256::MAX - 2).checked_add(I256::new(1)), Some(I256::MAX - 1));
assert_eq!((I256::MAX - 2).checked_add(I256::new(3)), None);
Source

pub fn checked_add_unsigned(self, rhs: U256) -> Option<I256>

Checked addition with an unsigned integer. Computes self + rhs, returning None if overflow occurred.

§Examples

Basic usage:

assert_eq!(I256::new(1).checked_add_unsigned(U256::new(2)), Some(I256::new(3)));
assert_eq!((I256::MAX - 2).checked_add_unsigned(U256::new(3)), None);
Source

pub fn checked_sub(self, rhs: I256) -> Option<I256>

Checked integer subtraction. Computes self - rhs, returning None if overflow occurred.

§Examples

Basic usage:

assert_eq!((I256::MIN + 2).checked_sub(I256::new(1)), Some(I256::MIN + 1));
assert_eq!((I256::MIN + 2).checked_sub(I256::new(3)), None);
Source

pub fn checked_sub_unsigned(self, rhs: U256) -> Option<I256>

Checked subtraction with an unsigned integer. Computes self - rhs, returning None if overflow occurred.

§Examples

Basic usage:

assert_eq!(I256::new(1).checked_sub_unsigned(U256::new(2)), Some(I256::new(-1)));
assert_eq!((I256::MIN + 2).checked_sub_unsigned(U256::new(3)), None);
Source

pub fn checked_mul(self, rhs: I256) -> Option<I256>

Checked integer multiplication. Computes self * rhs, returning None if overflow occurred.

§Examples

Basic usage:

assert_eq!(I256::MAX.checked_mul(I256::new(1)), Some(I256::MAX));
assert_eq!(I256::MAX.checked_mul(I256::new(2)), None);
Source

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

Checked integer division. Computes self / rhs, returning None if rhs == 0 or the division results in overflow.

§Examples

Basic usage:

assert_eq!((I256::MIN + 1).checked_div(I256::new(-1)), Some(I256::MAX));
assert_eq!(I256::MIN.checked_div(I256::new(-1)), None);
assert_eq!(I256::new(1).checked_div(I256::new(0)), None);
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.

§Examples

Basic usage:

assert_eq!((I256::MIN + 1).checked_div_euclid(I256::new(-1)), Some(I256::MAX));
assert_eq!(I256::MIN.checked_div_euclid(I256::new(-1)), None);
assert_eq!(I256::new(1).checked_div_euclid(I256::new(0)), None);
Source

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

Checked integer remainder. Computes self % rhs, returning None if rhs == 0 or the division results in overflow.

§Examples

Basic usage:

assert_eq!(I256::new(5).checked_rem(I256::new(2)), Some(I256::new(1)));
assert_eq!(I256::new(5).checked_rem(I256::new(0)), None);
assert_eq!(I256::MIN.checked_rem(I256::new(-1)), None);
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.

§Examples

Basic usage:

assert_eq!(I256::new(5).checked_rem_euclid(I256::new(2)), Some(I256::new(1)));
assert_eq!(I256::new(5).checked_rem_euclid(I256::new(0)), None);
assert_eq!(I256::MIN.checked_rem_euclid(I256::new(-1)), None);
Source

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

Checked negation. Computes -self, returning None if self == MIN.

§Examples

Basic usage:

assert_eq!(I256::new(5).checked_neg(), Some(I256::new(-5)));
assert_eq!(I256::MIN.checked_neg(), None);
Source

pub fn checked_shl(self, rhs: u32) -> Option<I256>

Checked shift left. Computes self << rhs, returning None if rhs is larger than or equal to the number of bits in self.

§Examples

Basic usage:

assert_eq!(I256::new(0x1).checked_shl(4), Some(I256::new(0x10)));
assert_eq!(I256::new(0x1).checked_shl(257), None);
Source

pub fn checked_shr(self, rhs: u32) -> Option<I256>

Checked shift right. Computes self >> rhs, returning None if rhs is larger than or equal to the number of bits in self.

§Examples

Basic usage:

assert_eq!(I256::new(0x10).checked_shr(4), Some(I256::new(0x1)));
assert_eq!(I256::new(0x10).checked_shr(256), None);
Source

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

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

§Examples

Basic usage:

assert_eq!(I256::new(-5).checked_abs(), Some(I256::new(5)));
assert_eq!(I256::MIN.checked_abs(), None);
Source

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

Checked exponentiation. Computes self.pow(exp), returning None if overflow occurred.

§Examples

Basic usage:

assert_eq!(I256::new(8).checked_pow(2), Some(I256::new(64)));
assert_eq!(I256::MAX.checked_pow(2), None);
Source

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

Saturating integer addition. Computes self + rhs, saturating at the numeric bounds instead of overflowing.

§Examples

Basic usage:

assert_eq!(I256::new(100).saturating_add(I256::new(1)), 101);
assert_eq!(I256::MAX.saturating_add(I256::new(100)), I256::MAX);
assert_eq!(I256::MIN.saturating_add(I256::new(-1)), I256::MIN);
Source

pub fn saturating_add_unsigned(self, rhs: U256) -> I256

Saturating addition with an unsigned integer. Computes self + rhs, saturating at the numeric bounds instead of overflowing.

§Examples

Basic usage:

assert_eq!(I256::new(1).saturating_add_unsigned(U256::new(2)), 3);
assert_eq!(I256::MAX.saturating_add_unsigned(U256::new(100)), I256::MAX);
Source

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

Saturating integer subtraction. Computes self - rhs, saturating at the numeric bounds instead of overflowing.

§Examples

Basic usage:

assert_eq!(I256::new(100).saturating_sub(I256::new(127)), -27);
assert_eq!(I256::MIN.saturating_sub(I256::new(100)), I256::MIN);
assert_eq!(I256::MAX.saturating_sub(I256::new(-1)), I256::MAX);
Source

pub fn saturating_sub_unsigned(self, rhs: U256) -> I256

Saturating subtraction with an unsigned integer. Computes self - rhs, saturating at the numeric bounds instead of overflowing.

§Examples

Basic usage:

assert_eq!(I256::new(100).saturating_sub_unsigned(U256::new(127)), -27);
assert_eq!(I256::MIN.saturating_sub_unsigned(U256::new(100)), I256::MIN);
Source

pub fn saturating_neg(self) -> I256

Saturating integer negation. Computes -self, returning MAX if self == MIN instead of overflowing.

§Examples

Basic usage:

assert_eq!(I256::new(100).saturating_neg(), -100);
assert_eq!(I256::new(-100).saturating_neg(), 100);
assert_eq!(I256::MIN.saturating_neg(), I256::MAX);
assert_eq!(I256::MAX.saturating_neg(), I256::MIN + 1);
Source

pub fn saturating_abs(self) -> I256

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

§Examples

Basic usage:

assert_eq!(I256::new(100).saturating_abs(), 100);
assert_eq!(I256::new(-100).saturating_abs(), 100);
assert_eq!(I256::MIN.saturating_abs(), I256::MAX);
assert_eq!((I256::MIN + 1).saturating_abs(), I256::MAX);
Source

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

Saturating integer multiplication. Computes self * rhs, saturating at the numeric bounds instead of overflowing.

§Examples

Basic usage:

assert_eq!(I256::new(10).saturating_mul(I256::new(12)), 120);
assert_eq!(I256::MAX.saturating_mul(I256::new(10)), I256::MAX);
assert_eq!(I256::MIN.saturating_mul(I256::new(10)), I256::MIN);
Source

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

Saturating integer division. Computes self / rhs, saturating at the numeric bounds instead of overflowing.

§Examples

Basic usage:

assert_eq!(I256::new(5).saturating_div(I256::new(2)), 2);
assert_eq!(I256::MAX.saturating_div(I256::new(-1)), I256::MIN + 1);
assert_eq!(I256::MIN.saturating_div(I256::new(-1)), I256::MAX);
let _ = I256::new(1).saturating_div(I256::new(0));
Source

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

Saturating integer exponentiation. Computes self.pow(exp), saturating at the numeric bounds instead of overflowing.

§Examples

Basic usage:

assert_eq!(I256::new(-4).saturating_pow(3), -64);
assert_eq!(I256::MIN.saturating_pow(2), I256::MAX);
assert_eq!(I256::MIN.saturating_pow(3), I256::MIN);
Source

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

Wrapping (modular) addition. Computes self + rhs, wrapping around at the boundary of the type.

§Examples

Basic usage:

assert_eq!(I256::new(100).wrapping_add(I256::new(27)), 127);
assert_eq!(I256::MAX.wrapping_add(I256::new(2)), I256::MIN + 1);
Source

pub fn wrapping_add_unsigned(self, rhs: U256) -> I256

Wrapping (modular) addition with an unsigned integer. Computes self + rhs, wrapping around at the boundary of the type.

§Examples

Basic usage:

assert_eq!(I256::new(100).wrapping_add_unsigned(U256::new(27)), 127);
assert_eq!(I256::MAX.wrapping_add_unsigned(U256::new(2)), I256::MIN + 1);
Source

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

Wrapping (modular) subtraction. Computes self - rhs, wrapping around at the boundary of the type.

§Examples

Basic usage:

assert_eq!(I256::new(0).wrapping_sub(I256::new(127)), -127);
assert_eq!(I256::new(-2).wrapping_sub(I256::MAX), I256::MAX);
Source

pub fn wrapping_sub_unsigned(self, rhs: U256) -> I256

Wrapping (modular) subtraction with an unsigned integer. Computes self - rhs, wrapping around at the boundary of the type.

§Examples

Basic usage:

assert_eq!(I256::new(0).wrapping_sub_unsigned(U256::new(127)), -127);
assert_eq!(I256::new(-2).wrapping_sub_unsigned(U256::MAX), -1);
Source

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

Wrapping (modular) multiplication. Computes self * rhs, wrapping around at the boundary of the type.

§Examples

Basic usage:

assert_eq!(I256::new(10).wrapping_mul(I256::new(12)), 120);
assert_eq!(I256::MAX.wrapping_mul(I256::new(2)), -2);
Source

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

Wrapping (modular) division. Computes self / rhs, wrapping around at the boundary of the type.

The only case where such wrapping can occur is when one divides 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 such a case, this function returns MIN itself.

§Panics

This function will panic if rhs is 0.

§Examples

Basic usage:

assert_eq!(I256::new(100).wrapping_div(I256::new(10)), 10);
assert_eq!(I256::MIN.wrapping_div(I256::new(-1)), I256::MIN);
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 will only occur 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.

§Panics

This function will panic if rhs is 0.

§Examples

Basic usage:

assert_eq!(I256::new(100).wrapping_div_euclid(I256::new(10)), 10);
assert_eq!(I256::MIN.wrapping_div_euclid(I256::new(-1)), I256::MIN);
Source

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

Wrapping (modular) remainder. Computes self % rhs, wrapping around at the boundary of the type.

Such wrap-around never actually occurs mathematically; implementation artifacts make x % y invalid for MIN / -1 on a signed type (where MINis the negative minimal value). In such a case, this function returns0`.

§Panics

This function will panic if rhs is 0.

§Examples

Basic usage:

assert_eq!(I256::new(100).wrapping_rem(I256::new(10)), 0);
assert_eq!(I256::MIN.wrapping_rem(I256::new(-1)), 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

This function will panic if rhs is 0.

§Examples

Basic usage:

assert_eq!(I256::new(100).wrapping_rem_euclid(I256::new(10)), 0);
assert_eq!(I256::MIN.wrapping_rem_euclid(I256::new(-1)), 0);
Source

pub fn wrapping_neg(self) -> I256

Wrapping (modular) negation. Computes -self, wrapping around at the boundary of the type.

The only case where such wrapping can occur is when one negates MIN on a signed type (where MIN is the negative minimal value for the type); this is a positive value that is too large to represent in the type. In such a case, this function returns MIN itself.

§Examples

Basic usage:

assert_eq!(I256::new(100).wrapping_neg(), -100);
assert_eq!(I256::MIN.wrapping_neg(), I256::MIN);
Source

pub fn wrapping_shl(self, rhs: u32) -> I256

Panic-free bitwise shift-left; yields self << mask(rhs), where mask removes any high-order bits of rhs that would cause the shift to exceed the bitwidth of the type.

Note that this is not the same as a rotate-left; the RHS of a wrapping shift-left is restricted to the range of the type, rather than the bits shifted out of the LHS being returned to the other end. The primitive integer types all implement a rotate_left function, which may be what you want instead.

§Examples

Basic usage:

assert_eq!(I256::new(-1).wrapping_shl(7), -128);
assert_eq!(I256::new(-1).wrapping_shl(128), I256::from_words(-1, 0));
assert_eq!(I256::new(-1).wrapping_shl(256), -1);
Source

pub fn wrapping_shr(self, rhs: u32) -> I256

Panic-free bitwise shift-right; yields self >> mask(rhs), where mask removes any high-order bits of rhs that would cause the shift to exceed the bitwidth of the type.

Note that this is not the same as a rotate-right; the RHS of a wrapping shift-right is restricted to the range of the type, rather than the bits shifted out of the LHS being returned to the other end. The primitive integer types all implement a rotate_right function, which may be what you want instead.

§Examples

Basic usage:

assert_eq!(I256::new(-128).wrapping_shr(7), -1);
assert_eq!((-128i16).wrapping_shr(64), -128);
Source

pub fn wrapping_abs(self) -> I256

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

The only case where such wrapping can occur is when one takes the absolute value of the negative minimal value for the type; this is a positive value that is too large to represent in the type. In such a case, this function returns MIN itself.

§Examples

Basic usage:

assert_eq!(I256::new(100).wrapping_abs(), 100);
assert_eq!(I256::new(-100).wrapping_abs(), 100);
assert_eq!(I256::MIN.wrapping_abs(), I256::MIN);
assert_eq!(
    I256::MIN.wrapping_abs().as_u256(),
    U256::from_words(
        0x80000000000000000000000000000000,
        0x00000000000000000000000000000000,
    ),
);
Source

pub fn unsigned_abs(self) -> U256

Computes the absolute value of self without any wrapping or panicking.

§Examples

Basic usage:

assert_eq!(I256::new(100).unsigned_abs(), 100);
assert_eq!(I256::new(-100).unsigned_abs(), 100);
assert_eq!(
    I256::MIN.unsigned_abs(),
    U256::from_words(
        0x80000000000000000000000000000000,
        0x00000000000000000000000000000000,
    ),
);
Source

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

Wrapping (modular) exponentiation. Computes self.pow(exp), wrapping around at the boundary of the type.

§Examples

Basic usage:

assert_eq!(I256::new(3).wrapping_pow(4), 81);
assert_eq!(3i8.wrapping_pow(5), -13);
assert_eq!(3i8.wrapping_pow(6), -39);
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.

§Examples

Basic usage:

assert_eq!(I256::new(5).overflowing_add(I256::new(2)), (I256::new(7), false));
assert_eq!(I256::MAX.overflowing_add(I256::new(1)), (I256::MIN, true));
Source

pub fn overflowing_add_unsigned(self, rhs: U256) -> (I256, bool)

Calculates self + rhs with an unsigned 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.

§Examples

Basic usage:

assert_eq!(I256::new(1).overflowing_add_unsigned(U256::new(2)), (I256::new(3), false));
assert_eq!((I256::MIN).overflowing_add_unsigned(U256::MAX), (I256::MAX, false));
assert_eq!((I256::MAX - 2).overflowing_add_unsigned(U256::new(3)), (I256::MIN, true));
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.

§Examples

Basic usage:

assert_eq!(I256::new(5).overflowing_sub(I256::new(2)), (I256::new(3), false));
assert_eq!(I256::MIN.overflowing_sub(I256::new(1)), (I256::MAX, true));
Source

pub fn overflowing_sub_unsigned(self, rhs: U256) -> (I256, bool)

Calculates self - rhs with an unsigned 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.

§Examples

Basic usage:

assert_eq!(I256::new(1).overflowing_sub_unsigned(U256::new(2)), (I256::new(-1), false));
assert_eq!((I256::MAX).overflowing_sub_unsigned(U256::MAX), (I256::MIN, false));
assert_eq!((I256::MIN + 2).overflowing_sub_unsigned(U256::new(3)), (I256::MAX, true));
Source

pub fn abs_diff(self, other: I256) -> U256

Computes the absolute difference between self and other.

This function always returns the correct answer without overflow or panics by returning an unsigned integer.

§Examples

Basic usage:

assert_eq!(I256::new(100).abs_diff(I256::new(80)), 20);
assert_eq!(I256::new(100).abs_diff(I256::new(110)), 10);
assert_eq!(I256::new(-100).abs_diff(I256::new(80)), 180);
assert_eq!(I256::new(-100).abs_diff(I256::new(-120)), 20);
assert_eq!(I256::MIN.abs_diff(I256::MAX), U256::MAX);
assert_eq!(I256::MAX.abs_diff(I256::MIN), U256::MAX);
Source

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

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.

§Examples

Basic usage:

assert_eq!(I256::new(5).overflowing_mul(I256::new(2)), (I256::new(10), false));
assert_eq!(I256::MAX.overflowing_mul(I256::new(2)), (I256::new(-2), true));
Source

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

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. If an overflow would occur then self is returned.

§Panics

This function will panic if rhs is 0.

§Examples

Basic usage:

assert_eq!(I256::new(5).overflowing_div(I256::new(2)), (I256::new(2), false));
assert_eq!(I256::MIN.overflowing_div(I256::new(-1)), (I256::MIN, true));
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.

§Panics

This function will panic if rhs is 0.

§Examples

Basic usage:

assert_eq!(I256::new(5).overflowing_div_euclid(I256::new(2)), (I256::new(2), false));
assert_eq!(I256::MIN.overflowing_div_euclid(I256::new(-1)), (I256::MIN, true));
Source

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

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. If an overflow would occur then 0 is returned.

§Panics

This function will panic if rhs is 0.

§Examples

Basic usage:

assert_eq!(I256::new(5).overflowing_rem(I256::new(2)), (I256::new(1), false));
assert_eq!(I256::MIN.overflowing_rem(I256::new(-1)), (I256::new(0), true));
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

This function will panic if rhs is 0.

§Examples

Basic usage:

assert_eq!(I256::new(5).overflowing_rem_euclid(I256::new(2)), (I256::new(1), false));
assert_eq!(I256::MIN.overflowing_rem_euclid(I256::new(-1)), (I256::new(0), true));
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 (e.g., i32::MIN for values of type i32), then the minimum value will be returned again and true will be returned for an overflow happening.

§Examples

Basic usage:

assert_eq!(I256::new(2).overflowing_neg(), (I256::new(-2), false));
assert_eq!(I256::MIN.overflowing_neg(), (I256::MIN, true));
Source

pub fn overflowing_shl(self, rhs: u32) -> (I256, bool)

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.

§Examples

Basic usage:

assert_eq!(I256::new(1).overflowing_shl(4), (I256::new(0x10), false));
assert_eq!(I256::new(1).overflowing_shl(260), (I256::new(0x10), true));
Source

pub fn overflowing_shr(self, rhs: u32) -> (I256, bool)

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.

§Examples

Basic usage:

assert_eq!(I256::new(0x10).overflowing_shr(4), (I256::new(0x1), false));
assert_eq!(I256::new(0x10).overflowing_shr(260), (I256::new(0x1), true));
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.

§Examples

Basic usage:

assert_eq!(I256::new(10).overflowing_abs(), (I256::new(10), false));
assert_eq!(I256::new(-10).overflowing_abs(), (I256::new(10), false));
assert_eq!(I256::MIN.overflowing_abs(), (I256::MIN, true));
Source

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

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.

§Examples

Basic usage:

assert_eq!(I256::new(3).overflowing_pow(4), (I256::new(81), false));
assert_eq!(
    I256::new(10).overflowing_pow(77),
    (
        I256::from_words(
            -46408779215366586471190473126206792002,
            -113521875028918879454725857041952276480,
        ),
        true,
    )
);
Source

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

Raises self to the power of exp, using exponentiation by squaring.

§Examples

Basic usage:


assert_eq!(I256::new(2).pow(5), 32);
Source

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

Calculates the quotient of Euclidean division of self by rhs.

This computes the integer q such that self = q * rhs + r, with r = self.rem_euclid(rhs) and 0 <= r < abs(rhs).

In other words, the result is self / rhs rounded to the integer q such that self >= q * 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.

§Panics

This function will panic if rhs is 0 or the division results in overflow.

§Examples

Basic usage:

let a = I256::new(7);
let b = I256::new(4);

assert_eq!(a.div_euclid(b), 1); // 7 >= 4 * 1
assert_eq!(a.div_euclid(-b), -1); // 7 >= -4 * -1
assert_eq!((-a).div_euclid(b), -2); // -7 >= 4 * -2
assert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2
Source

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

Calculates the least nonnegative 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).

§Panics

This function will panic if rhs is 0 or the division results in overflow.

§Examples

Basic usage:

let a = I256::new(7);
let b = I256::new(4);

assert_eq!(a.rem_euclid(b), 3);
assert_eq!((-a).rem_euclid(b), 1);
assert_eq!(a.rem_euclid(-b), 3);
assert_eq!((-a).rem_euclid(-b), 1);
Source

pub fn abs(self) -> I256

Computes the absolute value of self.

§Overflow behavior

The absolute value of I256::MIN cannot be represented as an I256, and attempting to calculate it will cause an overflow. This means that code in debug mode will trigger a panic on this case and optimized code will return I256::MIN without a panic.

§Examples

Basic usage:

assert_eq!(I256::new(10).abs(), 10);
assert_eq!(I256::new(-10).abs(), 10);
Source

pub const fn signum(self) -> I256

Returns a number representing sign of self.

  • 0 if the number is zero
  • 1 if the number is positive
  • -1 if the number is negative
§Examples

Basic usage:

assert_eq!(I256::new(10).signum(), 1);
assert_eq!(I256::new(0).signum(), 0);
assert_eq!(I256::new(-10).signum(), -1);
Source

pub const fn signum128(self) -> i128

Returns a number representing sign of self as a 64-bit signed integer.

  • 0 if the number is zero
  • 1 if the number is positive
  • -1 if the number is negative
§Examples

Basic usage:

assert_eq!(I256::new(10).signum128(), 1i128);
assert_eq!(I256::new(0).signum128(), 0i128);
assert_eq!(I256::new(-10).signum128(), -1i128);
Source

pub const fn is_positive(self) -> bool

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

§Examples

Basic usage:

assert!(I256::new(10).is_positive());
assert!(!I256::new(-10).is_positive());
Source

pub const fn is_negative(self) -> bool

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

§Examples

Basic usage:

assert!(I256::new(-10).is_negative());
assert!(!I256::new(10).is_negative());
Source

pub const fn to_be_bytes(self) -> [u8; 32]

Return the memory representation of this integer as a byte array in big-endian (network) byte order.

§Examples
let bytes = I256::from_words(
    0x00010203_04050607_08090a0b_0c0d0e0f,
    0x10111213_14151617_18191a1b_1c1d1e1f,
);
assert_eq!(
    bytes.to_be_bytes(),
    [
        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
        0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
    ],
);
Source

pub const fn to_le_bytes(self) -> [u8; 32]

Return the memory representation of this integer as a byte array in little-endian byte order.

§Examples
let bytes = I256::from_words(
    0x00010203_04050607_08090a0b_0c0d0e0f,
    0x10111213_14151617_18191a1b_1c1d1e1f,
);
assert_eq!(
    bytes.to_le_bytes(),
    [
        0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10,
        0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,
    ],
);
Source

pub const 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.

§Examples
let bytes = I256::from_words(
    0x00010203_04050607_08090a0b_0c0d0e0f,
    0x10111213_14151617_18191a1b_1c1d1e1f,
);
assert_eq!(
    bytes.to_ne_bytes(),
    if cfg!(target_endian = "big") {
        [
            0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
            0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
        ]
    } else {
        [
            0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10,
            0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,
        ]
    }
);
Source

pub const fn from_be_bytes(bytes: [u8; 32]) -> I256

Create an integer value from its representation as a byte array in big endian.

§Examples
let value = I256::from_be_bytes([
    0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
]);
assert_eq!(
    value,
    I256::from_words(
        0x00010203_04050607_08090a0b_0c0d0e0f,
        0x10111213_14151617_18191a1b_1c1d1e1f,
    ),
);

When starting from a slice rather than an array, fallible conversion APIs can be used:

fn read_be_i256(input: &mut &[u8]) -> I256 {
    let (int_bytes, rest) = input.split_at(std::mem::size_of::<I256>());
    *input = rest;
    I256::from_be_bytes(int_bytes.try_into().unwrap())
}
Source

pub const fn from_le_bytes(bytes: [u8; 32]) -> I256

Create an integer value from its representation as a byte array in little endian.

§Examples
let value = I256::from_le_bytes([
    0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10,
    0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,
]);
assert_eq!(
    value,
    I256::from_words(
        0x00010203_04050607_08090a0b_0c0d0e0f,
        0x10111213_14151617_18191a1b_1c1d1e1f,
    ),
);

When starting from a slice rather than an array, fallible conversion APIs can be used:

fn read_le_i256(input: &mut &[u8]) -> I256 {
    let (int_bytes, rest) = input.split_at(std::mem::size_of::<I256>());
    *input = rest;
    I256::from_le_bytes(int_bytes.try_into().unwrap())
}
Source

pub const fn from_ne_bytes(bytes: [u8; 32]) -> I256

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.

§Examples
let value = I256::from_ne_bytes(if cfg!(target_endian = "big") {
    [
        0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
        0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
    ]
} else {
    [
        0x1f, 0x1e, 0x1d, 0x1c, 0x1b, 0x1a, 0x19, 0x18, 0x17, 0x16, 0x15, 0x14, 0x13, 0x12, 0x11, 0x10,
        0x0f, 0x0e, 0x0d, 0x0c, 0x0b, 0x0a, 0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02, 0x01, 0x00,
    ]
});
assert_eq!(
    value,
    I256::from_words(
        0x00010203_04050607_08090a0b_0c0d0e0f,
        0x10111213_14151617_18191a1b_1c1d1e1f,
    ),
);

When starting from a slice rather than an array, fallible conversion APIs can be used:

fn read_ne_i256(input: &mut &[u8]) -> I256 {
    let (int_bytes, rest) = input.split_at(std::mem::size_of::<I256>());
    *input = rest;
    I256::from_ne_bytes(int_bytes.try_into().unwrap())
}
Source§

impl I256

Source

pub const ZERO: I256

The additive identity for this integer type, i.e. 0.

Source

pub const ONE: I256

The multiplicative identity for this integer type, i.e. 1.

Source

pub const MINUS_ONE: I256

The multiplicative inverse for this integer type, i.e. -1.

Source

pub const fn new(value: i128) -> I256

Creates a new 256-bit integer value from a primitive i128 integer.

Source

pub const fn from_words(hi: i128, lo: i128) -> I256

Creates a new 256-bit integer value from high and low words.

Source

pub const fn into_words(self) -> (i128, i128)

Splits a 256-bit integer into high and low words.

Source

pub fn low(&self) -> &i128

Get the low 128-bit word for this signed integer.

Source

pub fn low_mut(&mut self) -> &mut i128

Get the low 128-bit word for this signed integer as a mutable reference.

Source

pub fn high(&self) -> &i128

Get the high 128-bit word for this signed integer.

Source

pub fn high_mut(&mut self) -> &mut i128

Get the high 128-bit word for this signed integer as a mutable reference.

Source

pub fn from_str_hex(src: &str) -> Result<I256, ParseIntError>

Converts a prefixed string slice in base 16 to an integer.

The string is expected to be an optional + or - sign followed by the 0x prefix and finally the digits. Leading and trailing whitespace represent an error.

§Examples

Basic usage:

assert_eq!(I256::from_str_hex("0x2A"), Ok(I256::new(42)));
assert_eq!(I256::from_str_hex("-0xa"), Ok(I256::new(-10)));
Source

pub fn from_str_prefixed(src: &str) -> Result<I256, ParseIntError>

Converts a prefixed string slice in a base determined by the prefix to an integer.

The string is expected to be an optional + or - sign followed by the one of the supported prefixes and finally the digits. Leading and trailing whitespace represent an error. The base is determined based on the prefix:

  • 0b: base 2
  • 0o: base 8
  • 0x: base 16
  • no prefix: base 10
§Examples

Basic usage:

assert_eq!(I256::from_str_prefixed("-0b101"), Ok(I256::new(-0b101)));
assert_eq!(I256::from_str_prefixed("0o17"), Ok(I256::new(0o17)));
assert_eq!(I256::from_str_prefixed("-0xa"), Ok(I256::new(-0xa)));
assert_eq!(I256::from_str_prefixed("42"), Ok(I256::new(42)));
Source

pub const fn as_i8(self) -> i8

Cast to a primitive i8.

Source

pub const fn as_i16(self) -> i16

Cast to a primitive i16.

Source

pub const fn as_i32(self) -> i32

Cast to a primitive i32.

Source

pub const fn as_i64(self) -> i64

Cast to a primitive i64.

Source

pub const fn as_i128(self) -> i128

Cast to a primitive i128.

Source

pub const fn as_u8(self) -> u8

Cast to a primitive u8.

Source

pub const fn as_u16(self) -> u16

Cast to a primitive u16.

Source

pub const fn as_u32(self) -> u32

Cast to a primitive u32.

Source

pub const fn as_u64(self) -> u64

Cast to a primitive u64.

Source

pub const fn as_u128(self) -> u128

Cast to a primitive u128.

Source

pub const fn as_u256(self) -> U256

Cast to a U256.

Source

pub const fn as_isize(self) -> isize

Cast to a primitive isize.

Source

pub const fn as_usize(self) -> usize

Cast to a primitive usize.

Source

pub fn as_f32(self) -> f32

Cast to a primitive f32.

Source

pub fn as_f64(self) -> f64

Cast to a primitive f64.

Trait Implementations§

Source§

impl Add<&I256> for I256

Source§

type Output = I256

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&i128> for &I256

Source§

type Output = I256

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<&i128> for I256

Source§

type Output = I256

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<I256> for &I256

Source§

type Output = I256

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i128> for &I256

Source§

type Output = I256

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
Source§

impl Add<i128> for I256

Source§

type Output = I256

The resulting type after applying the + operator.
Source§

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

Performs the + operation. Read more
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 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<&I256> for I256

Source§

fn add_assign(&mut self, rhs: &I256)

Performs the += operation. Read more
Source§

impl AddAssign<&i128> for I256

Source§

fn add_assign(&mut self, rhs: &i128)

Performs the += operation. Read more
Source§

impl AddAssign<i128> for I256

Source§

fn add_assign(&mut self, rhs: i128)

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 AsI256 for I256

Source§

fn as_i256(self) -> I256

Perform an as conversion to a I256.
Source§

impl AsU256 for I256

Source§

fn as_u256(self) -> U256

Perform an as conversion to a U256.
Source§

impl Binary for I256

Source§

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

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

impl BitAnd<&I256> for &I256

Source§

type Output = I256

The resulting type after applying the & operator.
Source§

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

Performs the & operation. Read more
Source§

impl BitAnd<&I256> for I256

Source§

type Output = I256

The resulting type after applying the & operator.
Source§

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

Performs the & operation. Read more
Source§

impl BitAnd<&i128> for &I256

Source§

type Output = I256

The resulting type after applying the & operator.
Source§

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

Performs the & operation. Read more
Source§

impl BitAnd<&i128> for I256

Source§

type Output = I256

The resulting type after applying the & operator.
Source§

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

Performs the & operation. Read more
Source§

impl BitAnd<I256> for &I256

Source§

type Output = I256

The resulting type after applying the & operator.
Source§

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

Performs the & operation. Read more
Source§

impl BitAnd<i128> for &I256

Source§

type Output = I256

The resulting type after applying the & operator.
Source§

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

Performs the & operation. Read more
Source§

impl BitAnd<i128> for I256

Source§

type Output = I256

The resulting type after applying the & operator.
Source§

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

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<&I256> for I256

Source§

fn bitand_assign(&mut self, rhs: &I256)

Performs the &= operation. Read more
Source§

impl BitAndAssign<&i128> for I256

Source§

fn bitand_assign(&mut self, rhs: &i128)

Performs the &= operation. Read more
Source§

impl BitAndAssign<i128> for I256

Source§

fn bitand_assign(&mut self, rhs: i128)

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<&I256> for &I256

Source§

type Output = I256

The resulting type after applying the | operator.
Source§

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

Performs the | operation. Read more
Source§

impl BitOr<&I256> for I256

Source§

type Output = I256

The resulting type after applying the | operator.
Source§

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

Performs the | operation. Read more
Source§

impl BitOr<&i128> for &I256

Source§

type Output = I256

The resulting type after applying the | operator.
Source§

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

Performs the | operation. Read more
Source§

impl BitOr<&i128> for I256

Source§

type Output = I256

The resulting type after applying the | operator.
Source§

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

Performs the | operation. Read more
Source§

impl BitOr<I256> for &I256

Source§

type Output = I256

The resulting type after applying the | operator.
Source§

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

Performs the | operation. Read more
Source§

impl BitOr<i128> for &I256

Source§

type Output = I256

The resulting type after applying the | operator.
Source§

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

Performs the | operation. Read more
Source§

impl BitOr<i128> for I256

Source§

type Output = I256

The resulting type after applying the | operator.
Source§

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

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<&I256> for I256

Source§

fn bitor_assign(&mut self, rhs: &I256)

Performs the |= operation. Read more
Source§

impl BitOrAssign<&i128> for I256

Source§

fn bitor_assign(&mut self, rhs: &i128)

Performs the |= operation. Read more
Source§

impl BitOrAssign<i128> for I256

Source§

fn bitor_assign(&mut self, rhs: i128)

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<&I256> for &I256

Source§

type Output = I256

The resulting type after applying the ^ operator.
Source§

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

Performs the ^ operation. Read more
Source§

impl BitXor<&I256> for I256

Source§

type Output = I256

The resulting type after applying the ^ operator.
Source§

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

Performs the ^ operation. Read more
Source§

impl BitXor<&i128> for &I256

Source§

type Output = I256

The resulting type after applying the ^ operator.
Source§

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

Performs the ^ operation. Read more
Source§

impl BitXor<&i128> for I256

Source§

type Output = I256

The resulting type after applying the ^ operator.
Source§

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

Performs the ^ operation. Read more
Source§

impl BitXor<I256> for &I256

Source§

type Output = I256

The resulting type after applying the ^ operator.
Source§

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

Performs the ^ operation. Read more
Source§

impl BitXor<i128> for &I256

Source§

type Output = I256

The resulting type after applying the ^ operator.
Source§

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

Performs the ^ operation. Read more
Source§

impl BitXor<i128> for I256

Source§

type Output = I256

The resulting type after applying the ^ operator.
Source§

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

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<&I256> for I256

Source§

fn bitxor_assign(&mut self, rhs: &I256)

Performs the ^= operation. Read more
Source§

impl BitXorAssign<&i128> for I256

Source§

fn bitxor_assign(&mut self, rhs: &i128)

Performs the ^= operation. Read more
Source§

impl BitXorAssign<i128> for I256

Source§

fn bitxor_assign(&mut self, rhs: i128)

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

Source§

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

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

impl Div<&I256> for I256

Source§

type Output = I256

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&i128> for &I256

Source§

type Output = I256

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<&i128> for I256

Source§

type Output = I256

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<I256> for &I256

Source§

type Output = I256

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i128> for &I256

Source§

type Output = I256

The resulting type after applying the / operator.
Source§

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

Performs the / operation. Read more
Source§

impl Div<i128> for I256

Source§

type Output = I256

The resulting type after applying the / operator.
Source§

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

Performs the / operation. 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 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<&I256> for I256

Source§

fn div_assign(&mut self, rhs: &I256)

Performs the /= operation. Read more
Source§

impl DivAssign<&i128> for I256

Source§

fn div_assign(&mut self, rhs: &i128)

Performs the /= operation. Read more
Source§

impl DivAssign<i128> for I256

Source§

fn div_assign(&mut self, rhs: i128)

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<I256Small> for I256

Source§

fn from(value: I256Small) -> Self

Converts to this type from the input type.
Source§

impl From<bool> for I256

Source§

fn from(value: bool) -> I256

Converts to this type from the input type.
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<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 FromStr for I256

Source§

type Err = ParseIntError

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

fn from_str(s: &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 LowerExp for I256

Source§

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

Formats the value using the given formatter. 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<&I256> for I256

Source§

type Output = I256

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&i128> for &I256

Source§

type Output = I256

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<&i128> for I256

Source§

type Output = I256

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<I256> for &I256

Source§

type Output = I256

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<i128> for &I256

Source§

type Output = I256

The resulting type after applying the * operator.
Source§

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

Performs the * operation. Read more
Source§

impl Mul<i128> for I256

Source§

type Output = I256

The resulting type after applying the * operator.
Source§

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

Performs the * operation. 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 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<&I256> for I256

Source§

fn mul_assign(&mut self, rhs: &I256)

Performs the *= operation. Read more
Source§

impl MulAssign<&i128> for I256

Source§

fn mul_assign(&mut self, rhs: &i128)

Performs the *= operation. Read more
Source§

impl MulAssign<i128> for I256

Source§

fn mul_assign(&mut self, rhs: i128)

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 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 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 Octal for I256

Source§

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

Formats the value using the given formatter. 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<i128> for I256

Source§

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

Source§

fn partial_cmp(&self, rhs: &i128) -> 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 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<'a> Product<&'a I256> for I256

Source§

fn product<I>(iter: I) -> I256
where I: Iterator<Item = &'a I256>,

Takes an iterator and generates Self from the elements by multiplying the items.
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<&I256> for I256

Source§

type Output = I256

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl Rem<&i128> for &I256

Source§

type Output = I256

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl Rem<&i128> for I256

Source§

type Output = I256

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl Rem<I256> for &I256

Source§

type Output = I256

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl Rem<i128> for &I256

Source§

type Output = I256

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
Source§

impl Rem<i128> for I256

Source§

type Output = I256

The resulting type after applying the % operator.
Source§

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

Performs the % operation. Read more
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 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<&I256> for I256

Source§

fn rem_assign(&mut self, rhs: &I256)

Performs the %= operation. Read more
Source§

impl RemAssign<&i128> for I256

Source§

fn rem_assign(&mut self, rhs: &i128)

Performs the %= operation. Read more
Source§

impl RemAssign<i128> for I256

Source§

fn rem_assign(&mut self, rhs: i128)

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 Shl<&I256> for &I256

Source§

type Output = I256

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

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

Performs the << operation. Read more
Source§

impl Shl<&I256> for &U256

Source§

type Output = U256

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

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

Performs the << operation. Read more
Source§

impl Shl<&I256> for I256

Source§

type Output = I256

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

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

Performs the << operation. Read more
Source§

impl Shl<&I256> for U256

Source§

type Output = U256

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

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

Performs the << operation. 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<&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<&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<&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<&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<&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<&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<&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<&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<&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<&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<&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<&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<&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<I256> for &I256

Source§

type Output = I256

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

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

Performs the << operation. Read more
Source§

impl Shl<I256> for &U256

Source§

type Output = U256

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

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

Performs the << operation. Read more
Source§

impl Shl<I256> for U256

Source§

type Output = U256

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

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

Performs the << operation. 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<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<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<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<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<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<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<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<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<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<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<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<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<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<&I256> for I256

Source§

fn shl_assign(&mut self, rhs: &I256)

Performs the <<= operation. Read more
Source§

impl ShlAssign<&I256> for U256

Source§

fn shl_assign(&mut self, rhs: &I256)

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<I256> for U256

Source§

fn shl_assign(&mut self, rhs: I256)

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<&I256> for &I256

Source§

type Output = I256

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

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

Performs the >> operation. Read more
Source§

impl Shr<&I256> for &U256

Source§

type Output = U256

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

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

Performs the >> operation. Read more
Source§

impl Shr<&I256> for I256

Source§

type Output = I256

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

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

Performs the >> operation. Read more
Source§

impl Shr<&I256> for U256

Source§

type Output = U256

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

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

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<&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<&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<&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<&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<&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<&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<&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<&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<&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<&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<&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<&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<&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<I256> for &I256

Source§

type Output = I256

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

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

Performs the >> operation. Read more
Source§

impl Shr<I256> for &U256

Source§

type Output = U256

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

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

Performs the >> operation. Read more
Source§

impl Shr<I256> for U256

Source§

type Output = U256

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

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

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<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<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<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<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<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<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<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<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<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<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<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<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<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<&I256> for I256

Source§

fn shr_assign(&mut self, rhs: &I256)

Performs the >>= operation. Read more
Source§

impl ShrAssign<&I256> for U256

Source§

fn shr_assign(&mut self, rhs: &I256)

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<I256> for U256

Source§

fn shr_assign(&mut self, rhs: I256)

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<&I256> for I256

Source§

type Output = I256

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&i128> for &I256

Source§

type Output = I256

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<&i128> for I256

Source§

type Output = I256

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<I256> for &I256

Source§

type Output = I256

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<i128> for &I256

Source§

type Output = I256

The resulting type after applying the - operator.
Source§

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

Performs the - operation. Read more
Source§

impl Sub<i128> for I256

Source§

type Output = I256

The resulting type after applying the - operator.
Source§

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

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 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<&I256> for I256

Source§

fn sub_assign(&mut self, rhs: &I256)

Performs the -= operation. Read more
Source§

impl SubAssign<&i128> for I256

Source§

fn sub_assign(&mut self, rhs: &i128)

Performs the -= operation. Read more
Source§

impl SubAssign<i128> for I256

Source§

fn sub_assign(&mut self, rhs: i128)

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<'a> Sum<&'a I256> for I256

Source§

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

Takes an iterator and generates Self from the elements by “summing up” the items.
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 TryFrom<I256> for I256Small

Source§

type Error = ConversionError

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 U256

Source§

type Error = TryFromIntError

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 = TryFromIntError

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

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

Performs the conversion.
Source§

impl<E: Env> TryFromVal<E, &I256> for Val

Source§

type Error = Error

Source§

fn try_from_val(env: &E, v: &&I256) -> Result<Self, Self::Error>

Source§

impl<E: Env> TryFromVal<E, I256> for I256Val

Source§

type Error = Error

Source§

fn try_from_val(env: &E, v: &I256) -> Result<Self, Self::Error>

Source§

impl<E: Env> TryFromVal<E, I256> for Val

Source§

type Error = Error

Source§

fn try_from_val(env: &E, v: &I256) -> Result<Self, Self::Error>

Source§

impl<E: Env> TryFromVal<E, Val> for I256

Source§

type Error = Error

Source§

fn try_from_val(env: &E, v: &Val) -> Result<Self, Self::Error>

Source§

impl UpperExp for I256

Source§

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

Formats the value using the given formatter. Read more
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, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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<T, C> Compare<&T> for C
where C: Compare<T>,

Source§

type Error = <C as Compare<T>>::Error

Source§

fn compare(&self, a: &&T, b: &&T) -> Result<Ordering, <C as Compare<&T>>::Error>

Source§

impl<T, U, E, C> Compare<(T, U)> for C
where C: Compare<T, Error = E, Error = E> + Compare<U>,

Source§

type Error = E

Source§

fn compare( &self, a: &(T, U), b: &(T, U), ) -> Result<Ordering, <C as Compare<(T, U)>>::Error>

Source§

impl<T, U, V, E, C> Compare<(T, U, V)> for C
where C: Compare<T, Error = E, Error = E, Error = E> + Compare<U> + Compare<V>,

Source§

impl<T, U, V, W, E, C> Compare<(T, U, V, W)> for C
where C: Compare<T, Error = E, Error = E, Error = E, Error = E> + Compare<U> + Compare<V> + Compare<W>,

Source§

impl<T, U, V, W, X, E, C> Compare<(T, U, V, W, X)> for C
where C: Compare<T, Error = E, Error = E, Error = E, Error = E, Error = E> + Compare<U> + Compare<V> + Compare<W> + Compare<X>,

Source§

impl<T, C> Compare<Box<T>> for C
where C: Compare<T>,

Source§

type Error = <C as Compare<T>>::Error

Source§

fn compare( &self, a: &Box<T>, b: &Box<T>, ) -> Result<Ordering, <C as Compare<Box<T>>>::Error>

Source§

impl<T, C> Compare<Option<T>> for C
where C: Compare<T>,

Source§

type Error = <C as Compare<T>>::Error

Source§

fn compare( &self, a: &Option<T>, b: &Option<T>, ) -> Result<Ordering, <C as Compare<Option<T>>>::Error>

Source§

impl<T, C> Compare<Rc<T>> for C
where C: Compare<T>,

Source§

type Error = <C as Compare<T>>::Error

Source§

fn compare( &self, a: &Rc<T>, b: &Rc<T>, ) -> Result<Ordering, <C as Compare<Rc<T>>>::Error>

Source§

impl<T, C> Compare<Vec<T>> for C
where C: Compare<T>,

Source§

type Error = <C as Compare<T>>::Error

Source§

fn compare( &self, a: &Vec<T>, b: &Vec<T>, ) -> Result<Ordering, <C as Compare<Vec<T>>>::Error>

Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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, 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> 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<E, T, U> TryIntoVal<E, T> for U
where E: Env, T: TryFromVal<E, U>,

Source§

type Error = <T as TryFromVal<E, U>>::Error

Source§

fn try_into_val(&self, env: &E) -> Result<T, <U as TryIntoVal<E, T>>::Error>

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, Base> RefNum<Base> for T
where T: NumOps<Base, Base> + for<'r> NumOps<&'r Base, Base>,