Struct chaindexing::I256
source · pub struct I256(/* private fields */);
Expand description
Little-endian 256-bit signed integer.
§Diversion from standard numeric types
The right shift operator on I256 doesn’t act in the same manner as standard numeric types
(e.g. i8
, i16
etc). On standard types if the number is negative right shift will perform
an arithmetic shift, whereas on I256 this will perform a bit-wise shift.
Arithmetic shift on I256 is done via the asr and asl functions.
Implementations§
source§impl I256
impl I256
sourcepub fn overflowing_from_sign_and_abs(sign: Sign, abs: U256) -> (I256, bool)
pub fn overflowing_from_sign_and_abs(sign: Sign, abs: U256) -> (I256, bool)
Creates an I256 from a sign and an absolute value. Returns the value and a bool that is true if the conversion caused an overflow.
sourcepub fn checked_from_sign_and_abs(sign: Sign, abs: U256) -> Option<I256>
pub fn checked_from_sign_and_abs(sign: Sign, abs: U256) -> Option<I256>
Creates an I256 from an absolute value and a negative flag. Returns None
if it would
overflow an I256
.
sourcepub fn into_sign_and_abs(self) -> (Sign, U256)
pub fn into_sign_and_abs(self) -> (Sign, U256)
Splits a I256 into its absolute value and negative flag.
sourcepub const fn from_raw(raw: U256) -> I256
pub const fn from_raw(raw: U256) -> I256
Coerces an unsigned integer into a signed one. If the unsigned integer
is greater than the greater than or equal to 1 << 255
, then the result
will overflow into a negative value.
sourcepub const fn into_raw(self) -> U256
pub const fn into_raw(self) -> U256
Returns the signed integer as a unsigned integer. If the value of self
negative, then the
two’s complement of its absolute value will be returned.
sourcepub fn from_dec_str(value: &str) -> Result<I256, ParseI256Error>
pub fn from_dec_str(value: &str) -> Result<I256, ParseI256Error>
Convert from a decimal string.
sourcepub fn from_hex_str(value: &str) -> Result<I256, ParseI256Error>
pub fn from_hex_str(value: &str) -> Result<I256, ParseI256Error>
Convert from a hexadecimal string.
sourcepub fn signum(self) -> I256
pub fn signum(self) -> I256
Returns a number representing sign of self
.
0
if the number is zero1
if the number is positive-1
if the number is negative
sourcepub const fn is_positive(self) -> bool
pub const fn is_positive(self) -> bool
Returns true
if self
is positive and false
if the number is zero
or negative.
sourcepub const fn is_negative(self) -> bool
pub const fn is_negative(self) -> bool
Returns true
if self
is negative and false
if the number is zero
or positive.
sourcepub const fn is_zero(self) -> bool
pub const fn is_zero(self) -> bool
Returns true
if self
is zero and false
if the number is negative
or positive.
sourcepub fn count_ones(&self) -> u32
pub fn count_ones(&self) -> u32
Returns the number of ones in the binary representation of self
.
sourcepub fn count_zeros(&self) -> u32
pub fn count_zeros(&self) -> u32
Returns the number of zeros in the binary representation of self
.
sourcepub fn leading_zeros(&self) -> u32
pub fn leading_zeros(&self) -> u32
Returns the number of leading zeros in the binary representation of
self
.
sourcepub fn trailing_zeros(&self) -> u32
pub fn trailing_zeros(&self) -> u32
Returns the number of leading zeros in the binary representation of
self
.
sourcepub fn to_big_endian(&self, bytes: &mut [u8])
pub fn to_big_endian(&self, bytes: &mut [u8])
sourcepub fn to_little_endian(&self, bytes: &mut [u8])
pub fn to_little_endian(&self, bytes: &mut [u8])
Write to the slice in little-endian format.
§Panics
If the given slice is not exactly 32 bytes long.
source§impl I256
impl I256
sourcepub fn abs(self) -> I256
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.
sourcepub fn overflowing_abs(self) -> (I256, bool)
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 then the minimum value will be returned again and true will be returned for an overflow happening.
sourcepub fn checked_abs(self) -> Option<I256>
pub fn checked_abs(self) -> Option<I256>
Checked absolute value. Computes self.abs()
, returning None
if self == MIN
.
sourcepub fn saturating_abs(self) -> I256
pub fn saturating_abs(self) -> I256
Saturating absolute value. Computes self.abs()
, returning MAX
if self == MIN
instead
of overflowing.
sourcepub fn wrapping_abs(self) -> I256
pub fn wrapping_abs(self) -> I256
Wrapping absolute value. Computes self.abs()
, wrapping around at the boundary of the type.
sourcepub fn unsigned_abs(self) -> U256
pub fn unsigned_abs(self) -> U256
Computes the absolute value of self
without any wrapping or panicking.
sourcepub fn overflowing_neg(self) -> (I256, bool)
pub fn overflowing_neg(self) -> (I256, bool)
Negates self, overflowing if this is equal to the minimum value.
Returns a tuple of the negated version of self along with a boolean indicating whether an
overflow happened. If self
is the minimum value, then the minimum value will be returned
again and true
will be returned for an overflow happening.
sourcepub fn checked_neg(self) -> Option<I256>
pub fn checked_neg(self) -> Option<I256>
Checked negation. Computes -self
, returning None
if self == MIN
.
sourcepub fn saturating_neg(self) -> I256
pub fn saturating_neg(self) -> I256
Saturating negation. Computes -self
, returning MAX
if self == MIN
instead of
overflowing.
sourcepub fn wrapping_neg(self) -> I256
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.
sourcepub fn overflowing_add(self, rhs: I256) -> (I256, bool)
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.
sourcepub fn checked_add(self, rhs: I256) -> Option<I256>
pub fn checked_add(self, rhs: I256) -> Option<I256>
Checked integer addition. Computes self + rhs
, returning None
if overflow occurred.
sourcepub fn saturating_add(self, rhs: I256) -> I256
pub fn saturating_add(self, rhs: I256) -> I256
Saturating integer addition. Computes self + rhs
, saturating at the numeric bounds instead
of overflowing.
sourcepub fn wrapping_add(self, rhs: I256) -> I256
pub fn wrapping_add(self, rhs: I256) -> I256
Wrapping (modular) addition. Computes self + rhs
, wrapping around at the boundary of the
type.
sourcepub fn overflowing_sub(self, rhs: I256) -> (I256, bool)
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.
sourcepub fn checked_sub(self, rhs: I256) -> Option<I256>
pub fn checked_sub(self, rhs: I256) -> Option<I256>
Checked integer subtraction. Computes self - rhs
, returning None
if overflow occurred.
sourcepub fn saturating_sub(self, rhs: I256) -> I256
pub fn saturating_sub(self, rhs: I256) -> I256
Saturating integer subtraction. Computes self - rhs
, saturating at the numeric bounds
instead of overflowing.
sourcepub fn wrapping_sub(self, rhs: I256) -> I256
pub fn wrapping_sub(self, rhs: I256) -> I256
Wrapping (modular) subtraction. Computes self - rhs
, wrapping around at the boundary of
the type.
sourcepub fn overflowing_mul(self, rhs: I256) -> (I256, bool)
pub fn overflowing_mul(self, rhs: I256) -> (I256, bool)
Calculates self
* rhs
Returns a tuple of the multiplication along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would have occurred then the wrapped value is returned.
sourcepub fn checked_mul(self, rhs: I256) -> Option<I256>
pub fn checked_mul(self, rhs: I256) -> Option<I256>
Checked integer multiplication. Computes self * rhs
, returning None if overflow occurred.
sourcepub fn saturating_mul(self, rhs: I256) -> I256
pub fn saturating_mul(self, rhs: I256) -> I256
Saturating integer multiplication. Computes self * rhs
, saturating at the numeric bounds
instead of overflowing.
sourcepub fn wrapping_mul(self, rhs: I256) -> I256
pub fn wrapping_mul(self, rhs: I256) -> I256
Wrapping (modular) multiplication. Computes self * rhs
, wrapping around at the boundary of
the type.
sourcepub fn overflowing_div(self, rhs: I256) -> (I256, bool)
pub fn overflowing_div(self, rhs: I256) -> (I256, bool)
Calculates self
/ 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
If rhs
is 0.
sourcepub fn checked_div(self, rhs: I256) -> Option<I256>
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.
sourcepub fn saturating_div(self, rhs: I256) -> I256
pub fn saturating_div(self, rhs: I256) -> I256
Saturating integer division. Computes self / rhs
, saturating at the numeric bounds instead
of overflowing.
§Panics
If rhs
is 0.
sourcepub fn wrapping_div(self, rhs: I256) -> I256
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
If rhs
is 0.
sourcepub fn overflowing_rem(self, rhs: I256) -> (I256, bool)
pub fn overflowing_rem(self, rhs: I256) -> (I256, bool)
Calculates self
% rhs
Returns a tuple of the remainder after dividing along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would occur then 0 is returned.
§Panics
If rhs
is 0.
sourcepub fn checked_rem(self, rhs: I256) -> Option<I256>
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.
sourcepub fn wrapping_rem(self, rhs: I256) -> I256
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 MIN
is the negative minimal value). In such
a case, this function returns 0
.
§Panics
If rhs
is 0.
sourcepub fn div_euclid(self, rhs: I256) -> I256
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
If rhs
is 0 or the division results in overflow.
sourcepub fn overflowing_div_euclid(self, rhs: I256) -> (I256, bool)
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
If rhs
is 0.
sourcepub fn checked_div_euclid(self, rhs: I256) -> Option<I256>
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.
sourcepub fn wrapping_div_euclid(self, rhs: I256) -> I256
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
If rhs
is 0.
sourcepub fn rem_euclid(self, rhs: I256) -> I256
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
If rhs
is 0 or the division results in overflow.
sourcepub fn overflowing_rem_euclid(self, rhs: I256) -> (I256, bool)
pub fn overflowing_rem_euclid(self, rhs: I256) -> (I256, bool)
Overflowing Euclidean remainder. Calculates self.rem_euclid(rhs)
.
Returns a tuple of the remainder after dividing along with a boolean indicating whether an arithmetic overflow would occur. If an overflow would occur then 0 is returned.
§Panics
If rhs
is 0.
sourcepub fn wrapping_rem_euclid(self, rhs: I256) -> I256
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
If rhs
is 0.
sourcepub fn checked_rem_euclid(self, rhs: I256) -> Option<I256>
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.
sourcepub fn pow(self, exp: u32) -> I256
pub fn pow(self, exp: u32) -> I256
Raises self to the power of exp
, using exponentiation by squaring.
§Panics
If the result overflows the type in debug mode.
sourcepub fn overflowing_pow(self, exp: u32) -> (I256, bool)
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.
sourcepub fn checked_pow(self, exp: u32) -> Option<I256>
pub fn checked_pow(self, exp: u32) -> Option<I256>
Checked exponentiation. Computes self.pow(exp)
, returning None
if overflow occurred.
sourcepub fn saturating_pow(self, exp: u32) -> I256
pub fn saturating_pow(self, exp: u32) -> I256
Saturating integer exponentiation. Computes self.pow(exp)
, saturating at the numeric
bounds instead of overflowing.
sourcepub fn wrapping_pow(self, exp: u32) -> I256
pub fn wrapping_pow(self, exp: u32) -> I256
Raises self to the power of exp
, wrapping around at the
boundary of the type.
sourcepub fn overflowing_shl(self, rhs: usize) -> (I256, bool)
pub fn overflowing_shl(self, rhs: usize) -> (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.
sourcepub fn checked_shl(self, rhs: usize) -> Option<I256>
pub fn checked_shl(self, rhs: usize) -> Option<I256>
Checked shift left. Computes self << rhs
, returning None
if rhs
is larger than or
equal to the number of bits in self
.
sourcepub fn wrapping_shl(self, rhs: usize) -> I256
pub fn wrapping_shl(self, rhs: usize) -> I256
Wrapping shift left. Computes self << rhs
, returning 0 if larger than or equal to the
number of bits in self
.
sourcepub fn overflowing_shr(self, rhs: usize) -> (I256, bool)
pub fn overflowing_shr(self, rhs: usize) -> (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.
sourcepub fn checked_shr(self, rhs: usize) -> Option<I256>
pub fn checked_shr(self, rhs: usize) -> Option<I256>
Checked shift right. Computes self >> rhs
, returning None
if rhs
is larger than or
equal to the number of bits in self
.
sourcepub fn wrapping_shr(self, rhs: usize) -> I256
pub fn wrapping_shr(self, rhs: usize) -> I256
Wrapping shift right. Computes self >> rhs
, returning 0 if larger than or equal to the
number of bits in self
.
sourcepub fn asr(self, rhs: usize) -> I256
pub fn asr(self, rhs: usize) -> I256
Arithmetic shift right operation. Computes self >> rhs
maintaining the original sign. If
the number is positive this is the same as logic shift right.
sourcepub fn asl(self, rhs: usize) -> Option<I256>
pub fn asl(self, rhs: usize) -> Option<I256>
Arithmetic shift left operation. Computes self << rhs
, checking for overflow on the final
result.
Returns None
if the operation overflowed (most significant bit changes).
sourcepub fn twos_complement(self) -> U256
pub fn twos_complement(self) -> U256
Compute the two’s complement of this number.
source§impl I256
impl I256
Trait Implementations§
source§impl AbiType for I256
impl AbiType for I256
source§fn param_type() -> ParamType
fn param_type() -> ParamType
source§fn minimum_size() -> usize
fn minimum_size() -> usize
source§impl<T> AddAssign<T> for I256
impl<T> AddAssign<T> for I256
source§fn add_assign(&mut self, rhs: T)
fn add_assign(&mut self, rhs: T)
+=
operation. Read moresource§impl BitAndAssign for I256
impl BitAndAssign for I256
source§fn bitand_assign(&mut self, rhs: I256)
fn bitand_assign(&mut self, rhs: I256)
&=
operation. Read moresource§impl BitOrAssign for I256
impl BitOrAssign for I256
source§fn bitor_assign(&mut self, rhs: I256)
fn bitor_assign(&mut self, rhs: I256)
|=
operation. Read moresource§impl BitXorAssign for I256
impl BitXorAssign for I256
source§fn bitxor_assign(&mut self, rhs: I256)
fn bitxor_assign(&mut self, rhs: I256)
^=
operation. Read moresource§impl<'de> Deserialize<'de> for I256
impl<'de> Deserialize<'de> for I256
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<I256, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<I256, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
source§impl<T> DivAssign<T> for I256
impl<T> DivAssign<T> for I256
source§fn div_assign(&mut self, rhs: T)
fn div_assign(&mut self, rhs: T)
/=
operation. Read moresource§impl From<ParseUnits> for I256
impl From<ParseUnits> for I256
source§fn from(n: ParseUnits) -> I256
fn from(n: ParseUnits) -> I256
source§impl<T> MulAssign<T> for I256
impl<T> MulAssign<T> for I256
source§fn mul_assign(&mut self, rhs: T)
fn mul_assign(&mut self, rhs: T)
*=
operation. Read moresource§impl Ord for I256
impl Ord for I256
source§impl PartialEq for I256
impl PartialEq for I256
source§impl PartialOrd for I256
impl PartialOrd for I256
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<T> RemAssign<T> for I256
impl<T> RemAssign<T> for I256
source§fn rem_assign(&mut self, rhs: T)
fn rem_assign(&mut self, rhs: T)
%=
operation. Read moresource§impl Serialize for I256
impl Serialize for I256
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
source§impl ShlAssign<i16> for I256
impl ShlAssign<i16> for I256
source§fn shl_assign(&mut self, rhs: i16)
fn shl_assign(&mut self, rhs: i16)
<<=
operation. Read moresource§impl ShlAssign<i32> for I256
impl ShlAssign<i32> for I256
source§fn shl_assign(&mut self, rhs: i32)
fn shl_assign(&mut self, rhs: i32)
<<=
operation. Read moresource§impl ShlAssign<i64> for I256
impl ShlAssign<i64> for I256
source§fn shl_assign(&mut self, rhs: i64)
fn shl_assign(&mut self, rhs: i64)
<<=
operation. Read moresource§impl ShlAssign<i8> for I256
impl ShlAssign<i8> for I256
source§fn shl_assign(&mut self, rhs: i8)
fn shl_assign(&mut self, rhs: i8)
<<=
operation. Read moresource§impl ShlAssign<isize> for I256
impl ShlAssign<isize> for I256
source§fn shl_assign(&mut self, rhs: isize)
fn shl_assign(&mut self, rhs: isize)
<<=
operation. Read moresource§impl ShlAssign<u16> for I256
impl ShlAssign<u16> for I256
source§fn shl_assign(&mut self, rhs: u16)
fn shl_assign(&mut self, rhs: u16)
<<=
operation. Read moresource§impl ShlAssign<u32> for I256
impl ShlAssign<u32> for I256
source§fn shl_assign(&mut self, rhs: u32)
fn shl_assign(&mut self, rhs: u32)
<<=
operation. Read moresource§impl ShlAssign<u64> for I256
impl ShlAssign<u64> for I256
source§fn shl_assign(&mut self, rhs: u64)
fn shl_assign(&mut self, rhs: u64)
<<=
operation. Read moresource§impl ShlAssign<u8> for I256
impl ShlAssign<u8> for I256
source§fn shl_assign(&mut self, rhs: u8)
fn shl_assign(&mut self, rhs: u8)
<<=
operation. Read moresource§impl ShlAssign<usize> for I256
impl ShlAssign<usize> for I256
source§fn shl_assign(&mut self, rhs: usize)
fn shl_assign(&mut self, rhs: usize)
<<=
operation. Read moresource§impl ShrAssign<i16> for I256
impl ShrAssign<i16> for I256
source§fn shr_assign(&mut self, rhs: i16)
fn shr_assign(&mut self, rhs: i16)
>>=
operation. Read moresource§impl ShrAssign<i32> for I256
impl ShrAssign<i32> for I256
source§fn shr_assign(&mut self, rhs: i32)
fn shr_assign(&mut self, rhs: i32)
>>=
operation. Read moresource§impl ShrAssign<i64> for I256
impl ShrAssign<i64> for I256
source§fn shr_assign(&mut self, rhs: i64)
fn shr_assign(&mut self, rhs: i64)
>>=
operation. Read moresource§impl ShrAssign<i8> for I256
impl ShrAssign<i8> for I256
source§fn shr_assign(&mut self, rhs: i8)
fn shr_assign(&mut self, rhs: i8)
>>=
operation. Read moresource§impl ShrAssign<isize> for I256
impl ShrAssign<isize> for I256
source§fn shr_assign(&mut self, rhs: isize)
fn shr_assign(&mut self, rhs: isize)
>>=
operation. Read moresource§impl ShrAssign<u16> for I256
impl ShrAssign<u16> for I256
source§fn shr_assign(&mut self, rhs: u16)
fn shr_assign(&mut self, rhs: u16)
>>=
operation. Read moresource§impl ShrAssign<u32> for I256
impl ShrAssign<u32> for I256
source§fn shr_assign(&mut self, rhs: u32)
fn shr_assign(&mut self, rhs: u32)
>>=
operation. Read moresource§impl ShrAssign<u64> for I256
impl ShrAssign<u64> for I256
source§fn shr_assign(&mut self, rhs: u64)
fn shr_assign(&mut self, rhs: u64)
>>=
operation. Read moresource§impl ShrAssign<u8> for I256
impl ShrAssign<u8> for I256
source§fn shr_assign(&mut self, rhs: u8)
fn shr_assign(&mut self, rhs: u8)
>>=
operation. Read moresource§impl ShrAssign<usize> for I256
impl ShrAssign<usize> for I256
source§fn shr_assign(&mut self, rhs: usize)
fn shr_assign(&mut self, rhs: usize)
>>=
operation. Read moresource§impl<T> SubAssign<T> for I256
impl<T> SubAssign<T> for I256
source§fn sub_assign(&mut self, rhs: T)
fn sub_assign(&mut self, rhs: T)
-=
operation. Read moresource§impl Tokenizable for I256
impl Tokenizable for I256
source§fn from_token(token: Token) -> Result<I256, InvalidOutputType>
fn from_token(token: Token) -> Result<I256, InvalidOutputType>
Token
into expected type.source§fn into_token(self) -> Token
fn into_token(self) -> Token
impl AbiArrayType for I256
impl Copy for I256
impl Eq for I256
impl StructuralPartialEq for I256
impl TokenizableItem 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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<T> Detokenize for Twhere
T: Tokenizable,
impl<T> Detokenize for Twhere
T: Tokenizable,
source§fn from_tokens(tokens: Vec<Token>) -> Result<T, InvalidOutputType>
fn from_tokens(tokens: Vec<Token>) -> Result<T, InvalidOutputType>
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> FmtForward for T
impl<T> FmtForward for T
source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
&self
to an expression for Diesel’s query builder. Read moresource§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read moresource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R ) -> R
source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.source§impl<T, Conn> RunQueryDsl<Conn> for T
impl<T, Conn> RunQueryDsl<Conn> for T
source§fn execute<'conn, 'query>(
self,
conn: &'conn mut Conn
) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>
fn execute<'conn, 'query>( self, conn: &'conn mut Conn ) -> <Conn as AsyncConnection>::ExecuteFuture<'conn, 'query>
source§fn load<'query, 'conn, U>(
self,
conn: &'conn mut Conn
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(_: Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
fn load<'query, 'conn, U>( self, conn: &'conn mut Conn ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(_: Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
source§fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnection,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
fn load_stream<'conn, 'query, U>(
self,
conn: &'conn mut Conn
) -> Self::LoadFuture<'conn>where
Conn: AsyncConnection,
U: 'conn,
Self: LoadQuery<'query, Conn, U> + 'query,
source§fn get_result<'query, 'conn, U>(
self,
conn: &'conn mut Conn
) -> AndThen<Self::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>, fn(_: Self::Stream<'conn>) -> Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>>
fn get_result<'query, 'conn, U>( self, conn: &'conn mut Conn ) -> AndThen<Self::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>, fn(_: Self::Stream<'conn>) -> Map<StreamFuture<Pin<Box<Self::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<Self::Stream<'conn>>>)) -> Result<U, Error>>>
source§fn get_results<'query, 'conn, U>(
self,
conn: &'conn mut Conn
) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(_: Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
fn get_results<'query, 'conn, U>( self, conn: &'conn mut Conn ) -> AndThen<Self::LoadFuture<'conn>, TryCollect<Self::Stream<'conn>, Vec<U>>, fn(_: Self::Stream<'conn>) -> TryCollect<Self::Stream<'conn>, Vec<U>>>
Vec
with the affected rows. Read moresource§fn first<'query, 'conn, U>(
self,
conn: &'conn mut Conn
) -> AndThen<<Self::Output as LoadQuery<'query, Conn, U>>::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>, fn(_: <Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>) -> Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>>
fn first<'query, 'conn, U>( self, conn: &'conn mut Conn ) -> AndThen<<Self::Output as LoadQuery<'query, Conn, U>>::LoadFuture<'conn>, Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>, fn(_: <Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>) -> Map<StreamFuture<Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>>, fn(_: (Option<Result<U, Error>>, Pin<Box<<Self::Output as LoadQuery<'query, Conn, U>>::Stream<'conn>>>)) -> Result<U, Error>>>
source§impl<T> Tap for T
impl<T> Tap for T
source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read moresource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read moresource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read moresource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read moresource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read moresource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read moresource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.source§impl<T> Tokenize for Twhere
T: Tokenizable,
impl<T> Tokenize for Twhere
T: Tokenizable,
source§fn into_tokens(self) -> Vec<Token>
fn into_tokens(self) -> Vec<Token>
self
into a Vec<Token>
.