cast::revm::interpreter::primitives::alloy_primitives

Struct Uint

#[repr(transparent)]
pub struct Uint<const BITS: usize, const LIMBS: usize> { pub(crate) limbs: [u64; LIMBS], }
Expand description

The ring of numbers modulo $2^{\mathtt{BITS}}$.

Uint implements nearly all traits and methods from the std unsigned integer types, including most nightly only ones.

§Notable differences from std uint types.

  • The operators +, -, *, etc. using wrapping math by default. The std operators panic on overflow in debug, and are undefined in release, see reference.
  • The Uint::checked_shl, Uint::overflowing_shl, etc return overflow when non-zero bits are shifted out. In std they return overflow when the shift amount is greater than the bit size.
  • Some methods like u64::div_euclid and u64::rem_euclid are left out because they are meaningless or redundant for unsigned integers. Std has them for compatibility with their signed integers.
  • Many functions that are const in std are not in Uint.
  • Uint::to_le_bytes and Uint::to_be_bytes require the output size to be provided as a const-generic argument. They will runtime panic if the provided size is incorrect.
  • Uint::widening_mul takes as argument an Uint of arbitrary size and returns a result that is sized to fit the product without overflow (i.e. the sum of the bit sizes of self and the argument). The std version requires same-sized arguments and returns a pair of lower and higher bits.

Fields§

§limbs: [u64; LIMBS]

Implementations§

§

impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS>

pub fn abs_diff(self, other: Uint<BITS, LIMBS>) -> Uint<BITS, LIMBS>

Computes the absolute difference between self and other.

Returns $\left\vert \mathtt{self} - \mathtt{other} \right\vert$.

pub const fn checked_add( self, rhs: Uint<BITS, LIMBS>, ) -> Option<Uint<BITS, LIMBS>>

Computes self + rhs, returning None if overflow occurred.

pub const fn checked_neg(self) -> Option<Uint<BITS, LIMBS>>

Computes -self, returning None unless self == 0.

pub const fn checked_sub( self, rhs: Uint<BITS, LIMBS>, ) -> Option<Uint<BITS, LIMBS>>

Computes self - rhs, returning None if overflow occurred.

pub const fn overflowing_add( self, rhs: Uint<BITS, LIMBS>, ) -> (Uint<BITS, LIMBS>, bool)

Calculates $\mod{\mathtt{self} + \mathtt{rhs}}_{2^{BITS}}$.

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.

pub const fn overflowing_neg(self) -> (Uint<BITS, LIMBS>, bool)

Calculates $\mod{-\mathtt{self}}_{2^{BITS}}$.

Returns !self + 1 using wrapping operations to return the value that represents the negation of this unsigned value. Note that for positive unsigned values overflow always occurs, but negating 0 does not overflow.

pub const fn overflowing_sub( self, rhs: Uint<BITS, LIMBS>, ) -> (Uint<BITS, LIMBS>, bool)

Calculates $\mod{\mathtt{self} - \mathtt{rhs}}_{2^{BITS}}$.

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.

pub const fn saturating_add(self, rhs: Uint<BITS, LIMBS>) -> Uint<BITS, LIMBS>

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

pub const fn saturating_sub(self, rhs: Uint<BITS, LIMBS>) -> Uint<BITS, LIMBS>

Computes self - rhs, saturating at the numeric bounds instead of overflowing

pub const fn wrapping_add(self, rhs: Uint<BITS, LIMBS>) -> Uint<BITS, LIMBS>

Computes self + rhs, wrapping around at the boundary of the type.

pub const fn wrapping_neg(self) -> Uint<BITS, LIMBS>

Computes -self, wrapping around at the boundary of the type.

pub const fn wrapping_sub(self, rhs: Uint<BITS, LIMBS>) -> Uint<BITS, LIMBS>

Computes self - rhs, wrapping around at the boundary of the type.

§

impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS>

pub fn to_base_le(&self, base: u64) -> impl Iterator<Item = u64>

Returns an iterator over the base base digits of the number in little-endian order.

Pro tip: instead of setting base = 10, set it to the highest power of 10 that still fits u64. This way much fewer iterations are required to extract all the digits.

§Panics

Panics if the base is less than 2.

pub fn to_base_be(&self, base: u64) -> impl Iterator<Item = u64>

Available on crate feature alloc only.

Returns an iterator over the base base digits of the number in big-endian order.

Pro tip: instead of setting base = 10, set it to the highest power of 10 that still fits u64. This way much fewer iterations are required to extract all the digits.

§Panics

Panics if the base is less than 2.

pub fn from_base_le<I>( base: u64, digits: I, ) -> Result<Uint<BITS, LIMBS>, BaseConvertError>
where I: IntoIterator<Item = u64>,

Constructs the Uint from digits in the base base in little-endian.

§Errors

pub fn from_base_be<I>( base: u64, digits: I, ) -> Result<Uint<BITS, LIMBS>, BaseConvertError>
where I: IntoIterator<Item = u64>,

Constructs the Uint from digits in the base base in big-endian.

§Errors
§

impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS>

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

Returns whether a specific bit is set.

Returns false if index exceeds the bit width of the number.

pub fn set_bit(&mut self, index: usize, value: bool)

Sets a specific bit to a value.

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

Returns a specific byte. The byte at index 0 is the least significant byte (little endian).

§Panics

Panics if index exceeds the byte width of the number.

§Examples
let x = uint!(0x1234567890_U64);
let bytes = [
    x.byte(0), // 0x90
    x.byte(1), // 0x78
    x.byte(2), // 0x56
    x.byte(3), // 0x34
    x.byte(4), // 0x12
    x.byte(5), // 0x00
    x.byte(6), // 0x00
    x.byte(7), // 0x00
];
assert_eq!(bytes, x.to_le_bytes());

Panics if out of range.

let x = uint!(0x1234567890_U64);
let _ = x.byte(8);

pub fn reverse_bits(self) -> Uint<BITS, LIMBS>

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.

pub fn leading_zeros(&self) -> usize

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

pub fn leading_ones(&self) -> usize

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

pub fn trailing_zeros(&self) -> usize

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

pub fn trailing_ones(&self) -> usize

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

pub fn count_ones(&self) -> usize

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

pub fn count_zeros(&self) -> usize

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

pub fn bit_len(&self) -> usize

Length of the number in bits ignoring leading zeros.

pub fn byte_len(&self) -> usize

Length of the number in bytes ignoring leading zeros.

pub fn most_significant_bits(&self) -> (u64, usize)

Returns the most significant 64 bits of the number and the exponent.

Given return value $(\mathtt{bits}, \mathtt{exponent})$, the self can be approximated as

$$ \mathtt{self} ≈ \mathtt{bits} ⋅ 2^\mathtt{exponent} $$

If self is $<≥> 2^{63}$, then exponent will be zero and bits will have leading zeros.

pub fn checked_shl(self, rhs: usize) -> Option<Uint<BITS, LIMBS>>

Checked left shift by rhs bits.

Returns $\mathtt{self} ⋅ 2^{\mathtt{rhs}}$ or None if the result would $≥ 2^{\mathtt{BITS}}$. That is, it returns None if the bits shifted out would be non-zero.

Note: This differs from u64::checked_shl which returns None if the shift is larger than BITS (which is IMHO not very useful).

pub fn saturating_shl(self, rhs: usize) -> Uint<BITS, LIMBS>

Saturating left shift by rhs bits.

Returns $\mathtt{self} ⋅ 2^{\mathtt{rhs}}$ or Uint::MAX if the result would $≥ 2^{\mathtt{BITS}}$. That is, it returns Uint::MAX if the bits shifted out would be non-zero.

pub fn overflowing_shl(self, rhs: usize) -> (Uint<BITS, LIMBS>, bool)

Left shift by rhs bits with overflow detection.

Returns $\mod{\mathtt{value} ⋅ 2^{\mathtt{rhs}}}_{2^{\mathtt{BITS}}}$. If the product is $≥ 2^{\mathtt{BITS}}$ it returns true. That is, it returns true if the bits shifted out are non-zero.

Note: This differs from u64::overflowing_shl which returns true if the shift is larger than BITS (which is IMHO not very useful).

pub fn wrapping_shl(self, rhs: usize) -> Uint<BITS, LIMBS>

Left shift by rhs bits.

Returns $\mod{\mathtt{value} ⋅ 2^{\mathtt{rhs}}}_{2^{\mathtt{BITS}}}$.

Note: This differs from u64::wrapping_shl which first reduces rhs by BITS (which is IMHO not very useful).

pub fn checked_shr(self, rhs: usize) -> Option<Uint<BITS, LIMBS>>

Checked right shift by rhs bits.

$$ \frac{\mathtt{self}}{2^{\mathtt{rhs}}} $$

Returns the above or None if the division is not exact. This is the same as

Note: This differs from u64::checked_shr which returns None if the shift is larger than BITS (which is IMHO not very useful).

pub fn overflowing_shr(self, rhs: usize) -> (Uint<BITS, LIMBS>, bool)

Right shift by rhs bits with underflow detection.

$$ \floor{\frac{\mathtt{self}}{2^{\mathtt{rhs}}}} $$

Returns the above and false if the division was exact, and true if it was rounded down. This is the same as non-zero bits being shifted out.

Note: This differs from u64::overflowing_shr which returns true if the shift is larger than BITS (which is IMHO not very useful).

pub fn wrapping_shr(self, rhs: usize) -> Uint<BITS, LIMBS>

Right shift by rhs bits.

$$ \mathtt{wrapping\_shr}(\mathtt{self}, \mathtt{rhs}) = \floor{\frac{\mathtt{self}}{2^{\mathtt{rhs}}}} $$

Note: This differs from u64::wrapping_shr which first reduces rhs by BITS (which is IMHO not very useful).

pub fn arithmetic_shr(self, rhs: usize) -> Uint<BITS, LIMBS>

Arithmetic shift right by rhs bits.

pub fn rotate_left(self, rhs: usize) -> Uint<BITS, LIMBS>

Shifts the bits to the left by a specified amount, rhs, wrapping the truncated bits to the end of the resulting integer.

pub fn rotate_right(self, rhs: usize) -> Uint<BITS, LIMBS>

Shifts the bits to the right by a specified amount, rhs, wrapping the truncated bits to the beginning of the resulting integer.

§

impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS>

pub const BYTES: usize = _

The size of this integer type in bytes. Note that some bits may be forced zero if BITS is not cleanly divisible by eight.

pub const fn as_le_slice(&self) -> &[u8]

Available on little-endian only.

Access the underlying store as a little-endian slice of bytes.

Only available on little-endian targets.

If BITS does not evenly divide 8, it is padded with zero bits in the most significant position.

pub unsafe fn as_le_slice_mut(&mut self) -> &mut [u8]

Available on little-endian only.

Access the underlying store as a mutable little-endian slice of bytes.

Only available on litte-endian targets.

§Safety

If BITS does not evenly divide 8, it is padded with zero bits in the most significant position. Setting those bits puts the Uint in an invalid state.

pub fn as_le_bytes(&self) -> Cow<'_, [u8]>

Available on crate feature alloc only.

Access the underlying store as a little-endian bytes.

Uses an optimized implementation on little-endian targets.

pub fn as_le_bytes_trimmed(&self) -> Cow<'_, [u8]>

Available on crate feature alloc only.

Access the underlying store as a little-endian bytes with trailing zeros removed.

Uses an optimized implementation on little-endian targets.

pub const fn to_le_bytes<const BYTES: usize>(&self) -> [u8; BYTES]

Converts the Uint to a little-endian byte array of size exactly Self::BYTES.

§Panics

Panics if the generic parameter BYTES is not exactly Self::BYTES. Ideally this would be a compile time error, but this is blocked by Rust issue #60551.

pub fn to_le_bytes_vec(&self) -> Vec<u8>

Available on crate feature alloc only.

Converts the Uint to a little-endian byte vector of size exactly Self::BYTES.

This method is useful when Self::to_le_bytes can not be used because byte size is not known compile time.

pub fn to_le_bytes_trimmed_vec(&self) -> Vec<u8>

Available on crate feature alloc only.

Converts the Uint to a little-endian byte vector with trailing zeros bytes removed.

pub const fn to_be_bytes<const BYTES: usize>(&self) -> [u8; BYTES]

Converts the Uint to a big-endian byte array of size exactly Self::BYTES.

§Panics

Panics if the generic parameter BYTES is not exactly Self::BYTES. Ideally this would be a compile time error, but this is blocked by Rust issue #60551.

pub fn to_be_bytes_vec(&self) -> Vec<u8>

Available on crate feature alloc only.

Converts the Uint to a big-endian byte vector of size exactly Self::BYTES.

This method is useful when Self::to_be_bytes can not be used because byte size is not known compile time.

pub fn to_be_bytes_trimmed_vec(&self) -> Vec<u8>

Available on crate feature alloc only.

Converts the Uint to a big-endian byte vector with leading zeros bytes removed.

pub const fn from_be_bytes<const BYTES: usize>( bytes: [u8; BYTES], ) -> Uint<BITS, LIMBS>

Converts a big-endian byte array of size exactly Self::BYTES to Uint.

§Panics

Panics if the generic parameter BYTES is not exactly Self::BYTES. Ideally this would be a compile time error, but this is blocked by Rust issue #60551.

Panics if the value is too large for the bit-size of the Uint.

pub const fn from_be_slice(bytes: &[u8]) -> Uint<BITS, LIMBS>

Creates a new integer from a big endian slice of bytes.

The slice is interpreted as a big endian number. Leading zeros are ignored. The slice can be any length.

§Panics

Panics if the value is larger than fits the Uint.

pub const fn try_from_be_slice(bytes: &[u8]) -> Option<Uint<BITS, LIMBS>>

Creates a new integer from a big endian slice of bytes.

The slice is interpreted as a big endian number. Leading zeros are ignored. The slice can be any length.

Returns None if the value is larger than fits the Uint.

pub const fn from_le_bytes<const BYTES: usize>( bytes: [u8; BYTES], ) -> Uint<BITS, LIMBS>

Converts a little-endian byte array of size exactly Self::BYTES to Uint.

§Panics

Panics if the generic parameter BYTES is not exactly Self::BYTES. Ideally this would be a compile time error, but this is blocked by Rust issue #60551.

Panics if the value is too large for the bit-size of the Uint.

pub const fn from_le_slice(bytes: &[u8]) -> Uint<BITS, LIMBS>

Creates a new integer from a little endian slice of bytes.

The slice is interpreted as a little endian number. Leading zeros are ignored. The slice can be any length.

§Panics

Panics if the value is larger than fits the Uint.

pub const fn try_from_le_slice(bytes: &[u8]) -> Option<Uint<BITS, LIMBS>>

Creates a new integer from a little endian slice of bytes.

The slice is interpreted as a little endian number. Leading zeros are ignored. The slice can be any length.

Returns None if the value is larger than fits the Uint.

§

impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS>

pub fn is_zero(&self) -> bool

Returns true if the value is zero.

§

impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS>

pub fn checked_div(self, rhs: Uint<BITS, LIMBS>) -> Option<Uint<BITS, LIMBS>>

Computes self / rhs, returning None if rhs == 0.

pub fn checked_rem(self, rhs: Uint<BITS, LIMBS>) -> Option<Uint<BITS, LIMBS>>

Computes self % rhs, returning None if rhs == 0.

pub fn div_ceil(self, rhs: Uint<BITS, LIMBS>) -> Uint<BITS, LIMBS>

Computes self / rhs rounding up.

§Panics

Panics if rhs == 0.

pub fn div_rem( self, rhs: Uint<BITS, LIMBS>, ) -> (Uint<BITS, LIMBS>, Uint<BITS, LIMBS>)

Computes self / rhs and self % rhs.

§Panics

Panics if rhs == 0.

pub fn wrapping_div(self, rhs: Uint<BITS, LIMBS>) -> Uint<BITS, LIMBS>

Computes self / rhs rounding down.

§Panics

Panics if rhs == 0.

pub fn wrapping_rem(self, rhs: Uint<BITS, LIMBS>) -> Uint<BITS, LIMBS>

Computes self % rhs.

§Panics

Panics if rhs == 0.

§

impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS>

pub fn from<T>(value: T) -> Uint<BITS, LIMBS>
where Uint<BITS, LIMBS>: UintTryFrom<T>,

Construct a new Uint from the value.

§Panics

Panics if the conversion fails, for example if the value is too large for the bit-size of the Uint. The panic will be attributed to the call site.

§Examples
assert_eq!(U8::from(142_u16), 142_U8);
assert_eq!(U64::from(0x7014b4c2d1f2_U256), 0x7014b4c2d1f2_U64);
assert_eq!(U64::from(3.145), 3_U64);

pub fn saturating_from<T>(value: T) -> Uint<BITS, LIMBS>
where Uint<BITS, LIMBS>: UintTryFrom<T>,

Construct a new Uint from the value saturating the value to the minimum or maximum value of the Uint.

If the value is not a number (like f64::NAN), then the result is set zero.

§Examples
assert_eq!(U8::saturating_from(300_u16), 255_U8);
assert_eq!(U8::saturating_from(-10_i16), 0_U8);
assert_eq!(U32::saturating_from(0x7014b4c2d1f2_U256), U32::MAX);

pub fn wrapping_from<T>(value: T) -> Uint<BITS, LIMBS>
where Uint<BITS, LIMBS>: UintTryFrom<T>,

Construct a new Uint from the value saturating the value to the minimum or maximum value of the Uint.

If the value is not a number (like f64::NAN), then the result is set zero.

§Examples
assert_eq!(U8::wrapping_from(300_u16), 44_U8);
assert_eq!(U8::wrapping_from(-10_i16), 246_U8);
assert_eq!(U32::wrapping_from(0x7014b4c2d1f2_U256), 0xb4c2d1f2_U32);

pub fn to<T>(&self) -> T
where Uint<BITS, LIMBS>: UintTryTo<T>, T: Debug,

§Panics

Panics if the conversion fails, for example if the value is too large for the bit-size of the target type.

§Examples
assert_eq!(300_U12.to::<i16>(), 300_i16);
assert_eq!(300_U12.to::<U256>(), 300_U256);

pub fn wrapping_to<T>(&self) -> T
where Uint<BITS, LIMBS>: UintTryTo<T>,

§Examples
assert_eq!(300_U12.wrapping_to::<i8>(), 44_i8);
assert_eq!(255_U32.wrapping_to::<i8>(), -1_i8);
assert_eq!(0x1337cafec0d3_U256.wrapping_to::<U32>(), 0xcafec0d3_U32);

pub fn saturating_to<T>(&self) -> T
where Uint<BITS, LIMBS>: UintTryTo<T>,

§Examples
assert_eq!(300_U12.saturating_to::<i16>(), 300_i16);
assert_eq!(255_U32.saturating_to::<i8>(), 127);
assert_eq!(0x1337cafec0d3_U256.saturating_to::<U32>(), U32::MAX);
§

impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS>

pub fn gcd(self, other: Uint<BITS, LIMBS>) -> Uint<BITS, LIMBS>

Compute the greatest common divisor of two Uints.

§Examples
assert_eq!(0_U128.gcd(0_U128), 0_U128);

pub fn lcm(self, other: Uint<BITS, LIMBS>) -> Option<Uint<BITS, LIMBS>>

Compute the least common multiple of two Uints or None if the result would be too large.

pub fn gcd_extended( self, other: Uint<BITS, LIMBS>, ) -> (Uint<BITS, LIMBS>, Uint<BITS, LIMBS>, Uint<BITS, LIMBS>, bool)

⚠️ Compute the greatest common divisor and the Bézout coefficients.

Warning. This is API is unstable and may change in a minor release.

Returns $(\mathtt{gcd}, \mathtt{x}, \mathtt{y}, \mathtt{sign})$ such that

$$ \gcd(\mathtt{self}, \mathtt{other}) = \mathtt{gcd} = \begin{cases} \mathtt{self} · \mathtt{x} - \mathtt{other} . \mathtt{y} & \mathtt{sign} \\ \mathtt{other} · \mathtt{y} - \mathtt{self} · \mathtt{x} & ¬\mathtt{sign} \end{cases} $$

Note that the intermediate products may overflow, even though the result after subtraction will fit in the bit size of the Uint.

§

impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS>

pub fn checked_log(self, base: Uint<BITS, LIMBS>) -> Option<usize>

Returns the logarithm of the number, rounded down.

Returns None if the base is less than two, or this number is zero.

pub fn checked_log10(self) -> Option<usize>

Returns the base 10 logarithm of the number, rounded down.

Returns None if the number is zero.

pub fn checked_log2(self) -> Option<usize>

Returns the base 2 logarithm of the number, rounded down.

This is equivalent to the index of the highest set bit.

Returns None if the number is zero.

pub fn log(self, base: Uint<BITS, LIMBS>) -> usize

Returns the logarithm of the number, rounded down.

§Panics

Panics if the base is less than 2 or if the number is zero.

pub fn log10(self) -> usize

Returns the base 10 logarithm of the number, rounded down.

§Panics

Panics if the base if the number is zero.

pub fn log2(self) -> usize

Returns the base 2 logarithm of the number, rounded down.

§Panics

Panics if the base if the number is zero.

pub fn approx_log(self, base: f64) -> f64

Double precision logarithm.

pub fn approx_log2(self) -> f64

Double precision binary logarithm.

§Examples
assert_eq!(0_U64.approx_log2(), f64::NEG_INFINITY);
assert_eq!(1_U64.approx_log2(), 0.0);
assert_eq!(2_U64.approx_log2(), 1.0);
assert_eq!(U64::MAX.approx_log2(), 64.0);

pub fn approx_log10(self) -> f64

Double precision decimal logarithm.

§

impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS>

pub fn reduce_mod(self, modulus: Uint<BITS, LIMBS>) -> Uint<BITS, LIMBS>

⚠️ Compute $\mod{\mathtt{self}}_{\mathtt{modulus}}$.

Warning. This function is not part of the stable API.

Returns zero if the modulus is zero.

pub fn add_mod( self, rhs: Uint<BITS, LIMBS>, modulus: Uint<BITS, LIMBS>, ) -> Uint<BITS, LIMBS>

Compute $\mod{\mathtt{self} + \mathtt{rhs}}_{\mathtt{modulus}}$.

Returns zero if the modulus is zero.

pub fn mul_mod( self, rhs: Uint<BITS, LIMBS>, modulus: Uint<BITS, LIMBS>, ) -> Uint<BITS, LIMBS>

Compute $\mod{\mathtt{self} ⋅ \mathtt{rhs}}_{\mathtt{modulus}}$.

Returns zero if the modulus is zero.

See mul_redc for a faster variant at the cost of some pre-computation.

pub fn pow_mod( self, exp: Uint<BITS, LIMBS>, modulus: Uint<BITS, LIMBS>, ) -> Uint<BITS, LIMBS>

Compute $\mod{\mathtt{self}^{\mathtt{rhs}}}_{\mathtt{modulus}}$.

Returns zero if the modulus is zero.

pub fn inv_mod(self, modulus: Uint<BITS, LIMBS>) -> Option<Uint<BITS, LIMBS>>

Compute $\mod{\mathtt{self}^{-1}}_{\mathtt{modulus}}$.

Returns None if the inverse does not exist.

pub fn mul_redc( self, other: Uint<BITS, LIMBS>, modulus: Uint<BITS, LIMBS>, inv: u64, ) -> Uint<BITS, LIMBS>

Available on crate feature alloc only.

Montgomery multiplication.

Computes

$$ \mod{\frac{\mathtt{self} ⋅ \mathtt{other}}{ 2^{64 · \mathtt{LIMBS}}}}_{\mathtt{modulus}} $$

This is useful because it can be computed notably faster than mul_mod. Many computations can be done by pre-multiplying values with $R = 2^{64 · \mathtt{LIMBS}}$ and then using mul_redc instead of mul_mod.

For this algorithm to work, it needs an extra parameter inv which must be set to

$$ \mathtt{inv} = \mod{\frac{-1}{\mathtt{modulus}} }_{2^{64}} $$

The inv value only exists for odd values of modulus. It can be computed using inv_ring from U64.

let inv = U64::wrapping_from(modulus).inv_ring().unwrap().wrapping_neg().to();
let prod = 5_U256.mul_redc(6_U256, modulus, inv);
§Panics

Panics if inv is not correct.

§

impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS>

pub fn checked_mul(self, rhs: Uint<BITS, LIMBS>) -> Option<Uint<BITS, LIMBS>>

Computes self * rhs, returning None if overflow occurred.

pub fn overflowing_mul( self, rhs: Uint<BITS, LIMBS>, ) -> (Uint<BITS, LIMBS>, 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
assert_eq!(1_U1.overflowing_mul(1_U1), (1_U1, false));
assert_eq!(
    0x010000000000000000_U65.overflowing_mul(0x010000000000000000_U65),
    (0x000000000000000000_U65, true)
);

pub fn saturating_mul(self, rhs: Uint<BITS, LIMBS>) -> Uint<BITS, LIMBS>

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

pub fn wrapping_mul(self, rhs: Uint<BITS, LIMBS>) -> Uint<BITS, LIMBS>

Computes self * rhs, wrapping around at the boundary of the type.

pub fn inv_ring(self) -> Option<Uint<BITS, LIMBS>>

Computes the inverse modulo $2^{\mathtt{BITS}}$ of self, returning None if the inverse does not exist.

pub fn widening_mul<const BITS_RHS: usize, const LIMBS_RHS: usize, const BITS_RES: usize, const LIMBS_RES: usize>( self, rhs: Uint<BITS_RHS, LIMBS_RHS>, ) -> Uint<BITS_RES, LIMBS_RES>

Calculates the complete product self * rhs without the possibility to overflow.

The argument rhs can be any size Uint, the result size is the sum of the bit-sizes of self and rhs.

§Panics

This function will runtime panic of the const generic arguments are incorrect.

§Examples
assert_eq!(0_U0.widening_mul(0_U0), 0_U0);
assert_eq!(1_U1.widening_mul(1_U1), 1_U2);
assert_eq!(3_U2.widening_mul(7_U3), 21_U5);
§

impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS>

pub fn checked_pow(self, exp: Uint<BITS, LIMBS>) -> Option<Uint<BITS, LIMBS>>

Raises self to the power of exp.

Returns None if the result would overflow.

pub fn overflowing_pow( self, exp: Uint<BITS, LIMBS>, ) -> (Uint<BITS, LIMBS>, bool)

Raises self to the power of exp and if the result would overflow.

§Examples
assert_eq!(
    36_U64.overflowing_pow(12_U64),
    (0x41c21cb8e1000000_U64, false)
);
assert_eq!(
    36_U64.overflowing_pow(13_U64),
    (0x3f4c09ffa4000000_U64, true)
);
assert_eq!(
    36_U68.overflowing_pow(13_U68),
    (0x093f4c09ffa4000000_U68, false)
);
assert_eq!(16_U65.overflowing_pow(32_U65), (0_U65, true));

Small cases:

assert_eq!(0_U0.overflowing_pow(0_U0), (0_U0, false));
assert_eq!(0_U1.overflowing_pow(0_U1), (1_U1, false));
assert_eq!(0_U1.overflowing_pow(1_U1), (0_U1, false));
assert_eq!(1_U1.overflowing_pow(0_U1), (1_U1, false));
assert_eq!(1_U1.overflowing_pow(1_U1), (1_U1, false));

pub fn pow(self, exp: Uint<BITS, LIMBS>) -> Uint<BITS, LIMBS>

Raises self to the power of exp, wrapping around on overflow.

pub fn saturating_pow(self, exp: Uint<BITS, LIMBS>) -> Uint<BITS, LIMBS>

Raises self to the power of exp, saturating on overflow.

pub fn wrapping_pow(self, exp: Uint<BITS, LIMBS>) -> Uint<BITS, LIMBS>

Raises self to the power of exp, wrapping around on overflow.

pub fn approx_pow2(exp: f64) -> Option<Uint<BITS, LIMBS>>

Available on crate feature std only.

Construct from double precision binary logarithm.

§Examples
assert_eq!(U64::approx_pow2(-2.0), Some(0_U64));
assert_eq!(U64::approx_pow2(-1.0), Some(1_U64));
assert_eq!(U64::approx_pow2(0.0), Some(1_U64));
assert_eq!(U64::approx_pow2(1.0), Some(2_U64));
assert_eq!(U64::approx_pow2(1.6), Some(3_U64));
assert_eq!(U64::approx_pow2(2.0), Some(4_U64));
assert_eq!(U64::approx_pow2(64.0), None);
assert_eq!(U64::approx_pow2(10.385), Some(1337_U64));
§

impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS>

pub fn root(self, degree: usize) -> Uint<BITS, LIMBS>

Computes the floor of the degree-th root of the number.

$$ \floor{\sqrt[\mathtt{degree}]{\mathtt{self}}} $$

§Panics

Panics if degree is zero.

§Examples
assert_eq!(0_U64.root(2), 0_U64);
assert_eq!(1_U64.root(63), 1_U64);
assert_eq!(0x0032da8b0f88575d_U63.root(64), 1_U63);
assert_eq!(0x1756800000000000_U63.root(34), 3_U63);
§

impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS>

pub fn is_power_of_two(self) -> bool

Returns true if and only if self == 2^k for some k.

pub fn next_power_of_two(self) -> Uint<BITS, LIMBS>

Returns the smallest power of two greater than or equal to self.

§Panics

Panics if the value overlfows.

pub fn checked_next_power_of_two(self) -> Option<Uint<BITS, LIMBS>>

Returns the smallest power of two greater than or equal to self. If the next power of two is greater than the type’s maximum value, None is returned, otherwise the power of two is wrapped in Some.

§Examples
assert_eq!(0_U64.checked_next_power_of_two(), Some(1_U64));
assert_eq!(1_U64.checked_next_power_of_two(), Some(1_U64));
assert_eq!(2_U64.checked_next_power_of_two(), Some(2_U64));
assert_eq!(3_U64.checked_next_power_of_two(), Some(4_U64));
assert_eq!(U64::MAX.checked_next_power_of_two(), None);
§

impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS>

pub fn next_multiple_of(self, rhs: Uint<BITS, LIMBS>) -> Uint<BITS, LIMBS>

Calculates the smallest value greater than or equal to self that is a multiple of rhs.

§Panics

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

pub fn checked_next_multiple_of( self, rhs: Uint<BITS, LIMBS>, ) -> Option<Uint<BITS, LIMBS>>

Calculates the smallest value greater than or equal to self that is a multiple of rhs. Returns None is rhs is zero or the operation would result in overflow.

§Examples
assert_eq!(16_U64.checked_next_multiple_of(8_U64), Some(16_U64));
assert_eq!(23_U64.checked_next_multiple_of(8_U64), Some(24_U64));
assert_eq!(1_U64.checked_next_multiple_of(0_U64), None);
assert_eq!(U64::MAX.checked_next_multiple_of(2_U64), None);
}
assert_eq!(0_U0.checked_next_multiple_of(0_U0), None);
assert_eq!(0_U1.checked_next_multiple_of(0_U1), None);
assert_eq!(0_U1.checked_next_multiple_of(1_U1), Some(0_U1));
assert_eq!(1_U1.checked_next_multiple_of(0_U1), None);
assert_eq!(1_U1.checked_next_multiple_of(1_U1), Some(1_U1));
}
§

impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS>

pub fn from_str_radix( src: &str, radix: u64, ) -> Result<Uint<BITS, LIMBS>, ParseError>

Parse a string into a Uint.

For bases 2 to 36, the case-agnostic alphabet 0—1, a—b is used and _ are ignored. For bases 37 to 64, the case-sensitive alphabet a—z, A—Z, 0—9, {+-}, {/,_} is used. That is, for base 64 it is compatible with all the common base64 variants.

§Errors
§

impl<const BITS: usize, const LIMBS: usize> Uint<BITS, LIMBS>

pub const LIMBS: usize = _

The size of this integer type in 64-bit limbs.

pub const MASK: u64 = _

Bit mask for the last limb.

pub const BITS: usize = BITS

The size of this integer type in bits.

pub const ZERO: Uint<BITS, LIMBS> = _

The value zero. This is the only value that exists in all Uint types.

pub const MIN: Uint<BITS, LIMBS> = Self::ZERO

The smallest value that can be represented by this integer type. Synonym for Self::ZERO.

pub const MAX: Uint<BITS, LIMBS> = _

The largest value that can be represented by this integer type, $2^{\mathtt{BITS}} − 1$.

pub const fn as_limbs(&self) -> &[u64; LIMBS]

View the array of limbs.

pub unsafe fn as_limbs_mut(&mut self) -> &mut [u64; LIMBS]

Access the array of limbs.

§Safety

This function is unsafe because it allows setting a bit outside the bit size if the bit-size is not limb-aligned.

pub const fn into_limbs(self) -> [u64; LIMBS]

Convert to a array of limbs.

Limbs are least significant first.

pub const fn from_limbs(limbs: [u64; LIMBS]) -> Uint<BITS, LIMBS>

Construct a new integer from little-endian a array of limbs.

§Panics

Panics it LIMBS is not equal to nlimbs(BITS).

Panics if the value is to large for the bit-size of the Uint.

pub fn from_limbs_slice(slice: &[u64]) -> Uint<BITS, LIMBS>

Construct a new integer from little-endian a slice of limbs.

§Panics

Panics if the value is to large for the bit-size of the Uint.

pub fn checked_from_limbs_slice(slice: &[u64]) -> Option<Uint<BITS, LIMBS>>

Construct a new integer from little-endian a slice of limbs, or None if the value is too large for the Uint.

pub fn wrapping_from_limbs_slice(slice: &[u64]) -> Uint<BITS, LIMBS>

Construct a new Uint from a little-endian slice of limbs. Returns a potentially truncated value.

pub fn overflowing_from_limbs_slice(slice: &[u64]) -> (Uint<BITS, LIMBS>, bool)

Construct a new Uint from a little-endian slice of limbs. Returns a potentially truncated value and a boolean indicating whether the value was truncated.

pub fn saturating_from_limbs_slice(slice: &[u64]) -> Uint<BITS, LIMBS>

Construct a new Uint from a little-endian slice of limbs. Returns the maximum value if the value is too large for the Uint.

Trait Implementations§

§

impl<const BITS: usize, const LIMBS: usize> Add<&Uint<BITS, LIMBS>> for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the + operator.
§

fn add( self, rhs: &Uint<BITS, LIMBS>, ) -> <&Uint<BITS, LIMBS> as Add<&Uint<BITS, LIMBS>>>::Output

Performs the + operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Add<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the + operator.
§

fn add( self, rhs: &Uint<BITS, LIMBS>, ) -> <Uint<BITS, LIMBS> as Add<&Uint<BITS, LIMBS>>>::Output

Performs the + operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Add<Uint<BITS, LIMBS>> for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the + operator.
§

fn add( self, rhs: Uint<BITS, LIMBS>, ) -> <&Uint<BITS, LIMBS> as Add<Uint<BITS, LIMBS>>>::Output

Performs the + operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Add for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the + operator.
§

fn add(self, rhs: Uint<BITS, LIMBS>) -> <Uint<BITS, LIMBS> as Add>::Output

Performs the + operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> AddAssign<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

fn add_assign(&mut self, rhs: &Uint<BITS, LIMBS>)

Performs the += operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> AddAssign for Uint<BITS, LIMBS>

§

fn add_assign(&mut self, rhs: Uint<BITS, LIMBS>)

Performs the += operation. Read more
§

impl<'a, const BITS: usize, const LIMBS: usize> Arbitrary<'a> for Uint<BITS, LIMBS>

§

fn arbitrary(u: &mut Unstructured<'a>) -> Result<Uint<BITS, LIMBS>, Error>

Generate an arbitrary value of Self from the given unstructured data. Read more
§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
§

fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self, Error>

Generate an arbitrary value of Self from the entirety of the given unstructured data. Read more
§

fn try_size_hint( depth: usize, ) -> Result<(usize, Option<usize>), MaxRecursionReached>

Get a size hint for how many bytes out of an Unstructured this type needs to construct itself. Read more
§

impl<const BITS: usize, const LIMBS: usize> Arbitrary for Uint<BITS, LIMBS>

§

type Parameters = ()

The type of parameters that arbitrary_with accepts for configuration of the generated Strategy. Parameters must implement Default.
§

type Strategy = Map<<[u64; LIMBS] as Arbitrary>::Strategy, fn(_: [u64; LIMBS]) -> Uint<BITS, LIMBS>>

The type of Strategy used to generate values of type Self.
§

fn arbitrary() -> <Uint<BITS, LIMBS> as Arbitrary>::Strategy

Generates a Strategy for producing arbitrary values of type the implementing type (Self). Read more
§

fn arbitrary_with( _: <Uint<BITS, LIMBS> as Arbitrary>::Parameters, ) -> <Uint<BITS, LIMBS> as Arbitrary>::Strategy

Generates a Strategy for producing arbitrary values of type the implementing type (Self). The strategy is passed the arguments given in args. Read more
§

impl AsRef<Uint<256, 4>> for Panic

§

fn as_ref(&self) -> &Uint<256, 4>

Converts this type into a shared reference of the (usually inferred) input type.
§

impl<const BITS: usize, const LIMBS: usize> Binary for Uint<BITS, LIMBS>

§

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

Formats the value using the given formatter. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitAnd<&Uint<BITS, LIMBS>> for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the & operator.
§

fn bitand( self, rhs: &Uint<BITS, LIMBS>, ) -> <&Uint<BITS, LIMBS> as BitAnd<&Uint<BITS, LIMBS>>>::Output

Performs the & operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitAnd<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the & operator.
§

fn bitand( self, rhs: &Uint<BITS, LIMBS>, ) -> <Uint<BITS, LIMBS> as BitAnd<&Uint<BITS, LIMBS>>>::Output

Performs the & operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitAnd<Uint<BITS, LIMBS>> for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the & operator.
§

fn bitand( self, rhs: Uint<BITS, LIMBS>, ) -> <&Uint<BITS, LIMBS> as BitAnd<Uint<BITS, LIMBS>>>::Output

Performs the & operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitAnd for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the & operator.
§

fn bitand(self, rhs: Uint<BITS, LIMBS>) -> <Uint<BITS, LIMBS> as BitAnd>::Output

Performs the & operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitAndAssign<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

fn bitand_assign(&mut self, rhs: &Uint<BITS, LIMBS>)

Performs the &= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitAndAssign for Uint<BITS, LIMBS>

§

fn bitand_assign(&mut self, rhs: Uint<BITS, LIMBS>)

Performs the &= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitOr<&Uint<BITS, LIMBS>> for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the | operator.
§

fn bitor( self, rhs: &Uint<BITS, LIMBS>, ) -> <&Uint<BITS, LIMBS> as BitOr<&Uint<BITS, LIMBS>>>::Output

Performs the | operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitOr<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the | operator.
§

fn bitor( self, rhs: &Uint<BITS, LIMBS>, ) -> <Uint<BITS, LIMBS> as BitOr<&Uint<BITS, LIMBS>>>::Output

Performs the | operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitOr<Uint<BITS, LIMBS>> for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the | operator.
§

fn bitor( self, rhs: Uint<BITS, LIMBS>, ) -> <&Uint<BITS, LIMBS> as BitOr<Uint<BITS, LIMBS>>>::Output

Performs the | operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitOr for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the | operator.
§

fn bitor(self, rhs: Uint<BITS, LIMBS>) -> <Uint<BITS, LIMBS> as BitOr>::Output

Performs the | operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitOrAssign<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

fn bitor_assign(&mut self, rhs: &Uint<BITS, LIMBS>)

Performs the |= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitOrAssign for Uint<BITS, LIMBS>

§

fn bitor_assign(&mut self, rhs: Uint<BITS, LIMBS>)

Performs the |= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitXor<&Uint<BITS, LIMBS>> for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the ^ operator.
§

fn bitxor( self, rhs: &Uint<BITS, LIMBS>, ) -> <&Uint<BITS, LIMBS> as BitXor<&Uint<BITS, LIMBS>>>::Output

Performs the ^ operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitXor<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the ^ operator.
§

fn bitxor( self, rhs: &Uint<BITS, LIMBS>, ) -> <Uint<BITS, LIMBS> as BitXor<&Uint<BITS, LIMBS>>>::Output

Performs the ^ operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitXor<Uint<BITS, LIMBS>> for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the ^ operator.
§

fn bitxor( self, rhs: Uint<BITS, LIMBS>, ) -> <&Uint<BITS, LIMBS> as BitXor<Uint<BITS, LIMBS>>>::Output

Performs the ^ operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitXor for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the ^ operator.
§

fn bitxor(self, rhs: Uint<BITS, LIMBS>) -> <Uint<BITS, LIMBS> as BitXor>::Output

Performs the ^ operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitXorAssign<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

fn bitxor_assign(&mut self, rhs: &Uint<BITS, LIMBS>)

Performs the ^= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> BitXorAssign for Uint<BITS, LIMBS>

§

fn bitxor_assign(&mut self, rhs: Uint<BITS, LIMBS>)

Performs the ^= operation. Read more
§

impl Borrow<Uint<256, 4>> for Panic

§

fn borrow(&self) -> &Uint<256, 4>

Immutably borrows from an owned value. Read more
§

impl<const BITS: usize, const LIMBS: usize> Clone for Uint<BITS, LIMBS>

§

fn clone(&self) -> Uint<BITS, LIMBS>

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
§

impl ConsoleFmt for Uint<256, 4>

§

fn fmt(&self, spec: FormatSpec) -> String

Formats a value using a [FormatSpec].
§

impl<const BITS: usize, const LIMBS: usize> Debug for Uint<BITS, LIMBS>

§

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

Formats the value using the given formatter. Read more
§

impl<const BITS: usize, const LIMBS: usize> Decodable for Uint<BITS, LIMBS>

§

fn decode(buf: &mut &[u8]) -> Result<Uint<BITS, LIMBS>, Error>

Decodes the blob into the appropriate type. buf must be advanced past the decoded object.
§

impl<const BITS: usize, const LIMBS: usize> Default for Uint<BITS, LIMBS>

§

fn default() -> Uint<BITS, LIMBS>

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

impl<'de, const BITS: usize, const LIMBS: usize> Deserialize<'de> for Uint<BITS, LIMBS>

Deserialize human readable hex strings or byte arrays into hashes. Hex strings can be upper/lower/mixed case, have an optional 0x prefix, and can be any length. They are interpreted big-endian.

§

fn deserialize<D>( deserializer: D, ) -> Result<Uint<BITS, LIMBS>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

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

impl<const BITS: usize, const LIMBS: usize> Display for Uint<BITS, LIMBS>

§

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

Formats the value using the given formatter. Read more
§

impl<const BITS: usize, const LIMBS: usize> Distribution<Uint<BITS, LIMBS>> for Standard

§

fn sample<R>(&self, rng: &mut R) -> Uint<BITS, LIMBS>
where R: Rng + ?Sized,

Generate a random value of T, using rng as the source of randomness.
Source§

fn sample_iter<R>(self, rng: R) -> DistIter<Self, R, T>
where R: Rng, Self: Sized,

Create an iterator that generates random values of T, using rng as the source of randomness. Read more
Source§

fn map<F, S>(self, func: F) -> DistMap<Self, F, T, S>
where F: Fn(T) -> S, Self: Sized,

Create a distribution of values of ‘S’ by mapping the output of Self through the closure F Read more
§

impl<const BITS: usize, const LIMBS: usize> Div<&Uint<BITS, LIMBS>> for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the / operator.
§

fn div( self, rhs: &Uint<BITS, LIMBS>, ) -> <&Uint<BITS, LIMBS> as Div<&Uint<BITS, LIMBS>>>::Output

Performs the / operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Div<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the / operator.
§

fn div( self, rhs: &Uint<BITS, LIMBS>, ) -> <Uint<BITS, LIMBS> as Div<&Uint<BITS, LIMBS>>>::Output

Performs the / operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Div<Uint<BITS, LIMBS>> for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the / operator.
§

fn div( self, rhs: Uint<BITS, LIMBS>, ) -> <&Uint<BITS, LIMBS> as Div<Uint<BITS, LIMBS>>>::Output

Performs the / operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Div for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the / operator.
§

fn div(self, rhs: Uint<BITS, LIMBS>) -> <Uint<BITS, LIMBS> as Div>::Output

Performs the / operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> DivAssign<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

fn div_assign(&mut self, rhs: &Uint<BITS, LIMBS>)

Performs the /= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> DivAssign for Uint<BITS, LIMBS>

§

fn div_assign(&mut self, rhs: Uint<BITS, LIMBS>)

Performs the /= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Encodable for Uint<BITS, LIMBS>

§

fn length(&self) -> usize

Returns the length of the encoding of this type in bytes. Read more
§

fn encode(&self, out: &mut dyn BufMut)

Encodes the type into the out buffer.
§

impl<T> From<&Element<T>> for Uint<256, 4>

§

fn from(val: &Element<T>) -> Uint<256, 4>

Converts to this type from the input type.
§

impl<const BITS: usize, const LIMBS: usize> From<&Uint<BITS, LIMBS>> for f32

Available on crate feature std only.
§

fn from(value: &Uint<BITS, LIMBS>) -> f32

Approximate single precision float.

Returns f32::INFINITY if the value is too large to represent.

§

impl<const BITS: usize, const LIMBS: usize> From<&Uint<BITS, LIMBS>> for f64

Available on crate feature std only.
§

fn from(value: &Uint<BITS, LIMBS>) -> f64

Approximate double precision float.

Returns f64::INFINITY if the value is too large to represent.

§

impl From<Address> for Uint<160, 3>

§

fn from(value: Address) -> Uint<160, 3>

Converts to this type from the input type.
§

impl<const BITS: usize, const LIMBS: usize> From<Bits<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

fn from(value: Bits<BITS, LIMBS>) -> Uint<BITS, LIMBS>

Converts to this type from the input type.
§

impl<T> From<Element<T>> for Uint<256, 4>

§

fn from(val: Element<T>) -> Uint<256, 4>

Converts to this type from the input type.
§

impl From<FixedBytes<1>> for Uint<8, 1>

§

fn from(value: FixedBytes<1>) -> Uint<8, 1>

Converts a fixed byte array into a fixed-width unsigned integer by interpreting the bytes as big-endian.

§

impl From<FixedBytes<16>> for Uint<128, 2>

§

fn from(value: FixedBytes<16>) -> Uint<128, 2>

Converts a fixed byte array into a fixed-width unsigned integer by interpreting the bytes as big-endian.

§

impl From<FixedBytes<2>> for Uint<16, 1>

§

fn from(value: FixedBytes<2>) -> Uint<16, 1>

Converts a fixed byte array into a fixed-width unsigned integer by interpreting the bytes as big-endian.

§

impl From<FixedBytes<20>> for Uint<160, 3>

§

fn from(value: FixedBytes<20>) -> Uint<160, 3>

Converts a fixed byte array into a fixed-width unsigned integer by interpreting the bytes as big-endian.

§

impl From<FixedBytes<32>> for Uint<256, 4>

§

fn from(value: FixedBytes<32>) -> Uint<256, 4>

Converts a fixed byte array into a fixed-width unsigned integer by interpreting the bytes as big-endian.

§

impl From<FixedBytes<4>> for Uint<32, 1>

§

fn from(value: FixedBytes<4>) -> Uint<32, 1>

Converts a fixed byte array into a fixed-width unsigned integer by interpreting the bytes as big-endian.

§

impl From<FixedBytes<64>> for Uint<512, 8>

§

fn from(value: FixedBytes<64>) -> Uint<512, 8>

Converts a fixed byte array into a fixed-width unsigned integer by interpreting the bytes as big-endian.

§

impl From<FixedBytes<8>> for Uint<64, 1>

§

fn from(value: FixedBytes<8>) -> Uint<64, 1>

Converts a fixed byte array into a fixed-width unsigned integer by interpreting the bytes as big-endian.

§

impl From<Index> for Uint<256, 4>

§

fn from(idx: Index) -> Uint<256, 4>

Converts to this type from the input type.
§

impl From<Numeric> for Uint<256, 4>

§

fn from(n: Numeric) -> Uint<256, 4>

Converts to this type from the input type.
§

impl From<Numeric> for Uint<256, 4>

§

fn from(n: Numeric) -> Uint<256, 4>

Converts to this type from the input type.
§

impl From<Panic> for Uint<256, 4>

§

fn from(value: Panic) -> Uint<256, 4>

Converts to this type from the input type.
§

impl From<ParseUnits> for Uint<256, 4>

§

fn from(value: ParseUnits) -> Uint<256, 4>

Converts to this type from the input type.
§

impl From<ParseUnits> for Uint<256, 4>

§

fn from(n: ParseUnits) -> Uint<256, 4>

Converts to this type from the input type.
§

impl From<Uint<1, 1>> for Parity

§

fn from(value: Uint<1, 1>) -> Parity

Converts to this type from the input type.
§

impl From<Uint<128, 2>> for FixedBytes<16>

§

fn from(value: Uint<128, 2>) -> FixedBytes<16>

Converts a fixed-width unsigned integer into a fixed byte array by interpreting the bytes as big-endian.

§

impl From<Uint<16, 1>> for FixedBytes<2>

§

fn from(value: Uint<16, 1>) -> FixedBytes<2>

Converts a fixed-width unsigned integer into a fixed byte array by interpreting the bytes as big-endian.

§

impl From<Uint<160, 3>> for Address

§

fn from(value: Uint<160, 3>) -> Address

Converts to this type from the input type.
§

impl From<Uint<160, 3>> for FixedBytes<20>

§

fn from(value: Uint<160, 3>) -> FixedBytes<20>

Converts a fixed-width unsigned integer into a fixed byte array by interpreting the bytes as big-endian.

§

impl From<Uint<256, 4>> for DynSolValue

§

fn from(value: Uint<256, 4>) -> DynSolValue

Converts to this type from the input type.
§

impl From<Uint<256, 4>> for FilterSet<FixedBytes<32>>

§

fn from(src: Uint<256, 4>) -> FilterSet<FixedBytes<32>>

Converts to this type from the input type.
§

impl From<Uint<256, 4>> for FixedBytes<32>

§

fn from(value: Uint<256, 4>) -> FixedBytes<32>

Converts a fixed-width unsigned integer into a fixed byte array by interpreting the bytes as big-endian.

§

impl From<Uint<256, 4>> for JsonStorageKey

§

fn from(value: Uint<256, 4>) -> JsonStorageKey

Converts to this type from the input type.
Source§

impl From<Uint<256, 4>> for NumberWithBase

Source§

fn from(number: U256) -> Self

Converts to this type from the input type.
§

impl From<Uint<256, 4>> for Panic

§

fn from(value: Uint<256, 4>) -> Panic

Converts to this type from the input type.
§

impl From<Uint<256, 4>> for ParseUnits

§

fn from(value: Uint<256, 4>) -> ParseUnits

Converts to this type from the input type.
§

impl From<Uint<256, 4>> for ParseUnits

§

fn from(num: Uint<256, 4>) -> ParseUnits

Converts to this type from the input type.
§

impl From<Uint<256, 4>> for SubId

§

fn from(value: Uint<256, 4>) -> SubId

Converts to this type from the input type.
§

impl From<Uint<256, 4>> for WordToken

§

fn from(value: Uint<256, 4>) -> WordToken

Converts to this type from the input type.
§

impl From<Uint<32, 1>> for FixedBytes<4>

§

fn from(value: Uint<32, 1>) -> FixedBytes<4>

Converts a fixed-width unsigned integer into a fixed byte array by interpreting the bytes as big-endian.

§

impl From<Uint<512, 8>> for FixedBytes<64>

§

fn from(value: Uint<512, 8>) -> FixedBytes<64>

Converts a fixed-width unsigned integer into a fixed byte array by interpreting the bytes as big-endian.

§

impl From<Uint<64, 1>> for BlockId

§

fn from(value: Uint<64, 1>) -> BlockId

Converts to this type from the input type.
§

impl From<Uint<64, 1>> for BlockNumberOrTag

§

fn from(num: Uint<64, 1>) -> BlockNumberOrTag

Converts to this type from the input type.
§

impl From<Uint<64, 1>> for FilterBlockOption

§

fn from(block: Uint<64, 1>) -> FilterBlockOption

Converts to this type from the input type.
§

impl From<Uint<64, 1>> for FixedBytes<8>

§

fn from(value: Uint<64, 1>) -> FixedBytes<8>

Converts a fixed-width unsigned integer into a fixed byte array by interpreting the bytes as big-endian.

§

impl From<Uint<64, 1>> for HashOrNumber

§

fn from(value: Uint<64, 1>) -> HashOrNumber

Converts to this type from the input type.
§

impl From<Uint<8, 1>> for FixedBytes<1>

§

fn from(value: Uint<8, 1>) -> FixedBytes<1>

Converts a fixed-width unsigned integer into a fixed byte array by interpreting the bytes as big-endian.

§

impl<const BITS: usize, const LIMBS: usize> From<Uint<BITS, LIMBS>> for Bits<BITS, LIMBS>

§

fn from(value: Uint<BITS, LIMBS>) -> Bits<BITS, LIMBS>

Converts to this type from the input type.
§

impl<const BITS: usize, const LIMBS: usize> From<Uint<BITS, LIMBS>> for f32

Available on crate feature std only.
§

fn from(value: Uint<BITS, LIMBS>) -> f32

Converts to this type from the input type.
§

impl<const BITS: usize, const LIMBS: usize> From<Uint<BITS, LIMBS>> for f64

Available on crate feature std only.
§

fn from(value: Uint<BITS, LIMBS>) -> f64

Converts to this type from the input type.
§

impl<const BITS: usize, const LIMBS: usize> FromStr for Uint<BITS, LIMBS>

§

type Err = ParseError

The associated error which can be returned from parsing.
§

fn from_str( src: &str, ) -> Result<Uint<BITS, LIMBS>, <Uint<BITS, LIMBS> as FromStr>::Err>

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

impl<const BITS: usize, const LIMBS: usize> Hash for Uint<BITS, LIMBS>

§

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
§

impl<const BITS: usize, const LIMBS: usize> LowerHex for Uint<BITS, LIMBS>

§

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

Formats the value using the given formatter. Read more
§

impl<const BITS: usize, const LIMBS: usize> MaxEncodedLenAssoc for Uint<BITS, LIMBS>

§

const LEN: usize = _

The maximum length.
§

impl<const BITS: usize, const LIMBS: usize> Mul<&Uint<BITS, LIMBS>> for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the * operator.
§

fn mul( self, rhs: &Uint<BITS, LIMBS>, ) -> <&Uint<BITS, LIMBS> as Mul<&Uint<BITS, LIMBS>>>::Output

Performs the * operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Mul<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the * operator.
§

fn mul( self, rhs: &Uint<BITS, LIMBS>, ) -> <Uint<BITS, LIMBS> as Mul<&Uint<BITS, LIMBS>>>::Output

Performs the * operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Mul<Uint<BITS, LIMBS>> for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the * operator.
§

fn mul( self, rhs: Uint<BITS, LIMBS>, ) -> <&Uint<BITS, LIMBS> as Mul<Uint<BITS, LIMBS>>>::Output

Performs the * operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Mul for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the * operator.
§

fn mul(self, rhs: Uint<BITS, LIMBS>) -> <Uint<BITS, LIMBS> as Mul>::Output

Performs the * operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> MulAssign<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

fn mul_assign(&mut self, rhs: &Uint<BITS, LIMBS>)

Performs the *= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> MulAssign for Uint<BITS, LIMBS>

§

fn mul_assign(&mut self, rhs: Uint<BITS, LIMBS>)

Performs the *= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Neg for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the - operator.
§

fn neg(self) -> <&Uint<BITS, LIMBS> as Neg>::Output

Performs the unary - operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Neg for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the - operator.
§

fn neg(self) -> <Uint<BITS, LIMBS> as Neg>::Output

Performs the unary - operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Not for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the ! operator.
§

fn not(self) -> <&Uint<BITS, LIMBS> as Not>::Output

Performs the unary ! operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Not for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the ! operator.
§

fn not(self) -> <Uint<BITS, LIMBS> as Not>::Output

Performs the unary ! operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Octal for Uint<BITS, LIMBS>

§

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

Formats the value using the given formatter. Read more
§

impl<const BITS: usize, const LIMBS: usize> Ord for Uint<BITS, LIMBS>

§

fn cmp(&self, rhs: &Uint<BITS, LIMBS>) -> 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
§

impl<const BITS: usize, const LIMBS: usize> PartialEq for Uint<BITS, LIMBS>

§

fn eq(&self, other: &Uint<BITS, LIMBS>) -> 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.
§

impl<const BITS: usize, const LIMBS: usize> PartialOrd for Uint<BITS, LIMBS>

§

fn partial_cmp(&self, other: &Uint<BITS, LIMBS>) -> 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
§

impl<'a, const BITS: usize, const LIMBS: usize> Product<&'a Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

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

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

impl<const BITS: usize, const LIMBS: usize> Product for Uint<BITS, LIMBS>

§

fn product<I>(iter: I) -> Uint<BITS, LIMBS>
where I: Iterator<Item = Uint<BITS, LIMBS>>,

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

impl<const BITS: usize, const LIMBS: usize> Rem<&Uint<BITS, LIMBS>> for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the % operator.
§

fn rem( self, rhs: &Uint<BITS, LIMBS>, ) -> <&Uint<BITS, LIMBS> as Rem<&Uint<BITS, LIMBS>>>::Output

Performs the % operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Rem<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the % operator.
§

fn rem( self, rhs: &Uint<BITS, LIMBS>, ) -> <Uint<BITS, LIMBS> as Rem<&Uint<BITS, LIMBS>>>::Output

Performs the % operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Rem<Uint<BITS, LIMBS>> for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the % operator.
§

fn rem( self, rhs: Uint<BITS, LIMBS>, ) -> <&Uint<BITS, LIMBS> as Rem<Uint<BITS, LIMBS>>>::Output

Performs the % operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Rem for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the % operator.
§

fn rem(self, rhs: Uint<BITS, LIMBS>) -> <Uint<BITS, LIMBS> as Rem>::Output

Performs the % operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> RemAssign<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

fn rem_assign(&mut self, rhs: &Uint<BITS, LIMBS>)

Performs the %= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> RemAssign for Uint<BITS, LIMBS>

§

fn rem_assign(&mut self, rhs: Uint<BITS, LIMBS>)

Performs the %= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Serialize for Uint<BITS, LIMBS>

Serialize a Uint value.

For human readable formats a 0x prefixed lower case hex string is used. For binary formats a byte array is used. Leading zeros are included.

§

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

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

impl<const BITS: usize, const LIMBS: usize> Shl<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl( self, rhs: &Uint<BITS, LIMBS>, ) -> <Uint<BITS, LIMBS> as Shl<&Uint<BITS, LIMBS>>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<&i16> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: &i16) -> <Uint<BITS, LIMBS> as Shl<&i16>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<&i32> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: &i32) -> <Uint<BITS, LIMBS> as Shl<&i32>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<&i64> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: &i64) -> <Uint<BITS, LIMBS> as Shl<&i64>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<&i8> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: &i8) -> <Uint<BITS, LIMBS> as Shl<&i8>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<&isize> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: &isize) -> <Uint<BITS, LIMBS> as Shl<&isize>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<&u16> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: &u16) -> <Uint<BITS, LIMBS> as Shl<&u16>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<&u32> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: &u32) -> <Uint<BITS, LIMBS> as Shl<&u32>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<&u64> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: &u64) -> <Uint<BITS, LIMBS> as Shl<&u64>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<&u8> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: &u8) -> <Uint<BITS, LIMBS> as Shl<&u8>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<&usize> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: &usize) -> <Uint<BITS, LIMBS> as Shl<&usize>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<i16> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: i16) -> <Uint<BITS, LIMBS> as Shl<i16>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<i32> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: i32) -> <Uint<BITS, LIMBS> as Shl<i32>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<i64> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: i64) -> <Uint<BITS, LIMBS> as Shl<i64>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<i8> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: i8) -> <Uint<BITS, LIMBS> as Shl<i8>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<isize> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: isize) -> <Uint<BITS, LIMBS> as Shl<isize>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<u16> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: u16) -> <Uint<BITS, LIMBS> as Shl<u16>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<u32> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: u32) -> <Uint<BITS, LIMBS> as Shl<u32>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<u64> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: u64) -> <Uint<BITS, LIMBS> as Shl<u64>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<u8> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: u8) -> <Uint<BITS, LIMBS> as Shl<u8>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl<usize> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: usize) -> <Uint<BITS, LIMBS> as Shl<usize>>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shl for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the << operator.
§

fn shl(self, rhs: Uint<BITS, LIMBS>) -> <Uint<BITS, LIMBS> as Shl>::Output

Performs the << operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

fn shl_assign(&mut self, rhs: &Uint<BITS, LIMBS>)

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<&i16> for Uint<BITS, LIMBS>

§

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

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<&i32> for Uint<BITS, LIMBS>

§

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

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<&i64> for Uint<BITS, LIMBS>

§

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

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<&i8> for Uint<BITS, LIMBS>

§

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

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<&isize> for Uint<BITS, LIMBS>

§

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

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<&u16> for Uint<BITS, LIMBS>

§

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

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<&u32> for Uint<BITS, LIMBS>

§

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

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<&u64> for Uint<BITS, LIMBS>

§

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

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<&u8> for Uint<BITS, LIMBS>

§

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

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<&usize> for Uint<BITS, LIMBS>

§

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

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<i16> for Uint<BITS, LIMBS>

§

fn shl_assign(&mut self, rhs: i16)

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<i32> for Uint<BITS, LIMBS>

§

fn shl_assign(&mut self, rhs: i32)

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<i64> for Uint<BITS, LIMBS>

§

fn shl_assign(&mut self, rhs: i64)

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<i8> for Uint<BITS, LIMBS>

§

fn shl_assign(&mut self, rhs: i8)

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<isize> for Uint<BITS, LIMBS>

§

fn shl_assign(&mut self, rhs: isize)

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<u16> for Uint<BITS, LIMBS>

§

fn shl_assign(&mut self, rhs: u16)

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<u32> for Uint<BITS, LIMBS>

§

fn shl_assign(&mut self, rhs: u32)

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<u64> for Uint<BITS, LIMBS>

§

fn shl_assign(&mut self, rhs: u64)

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<u8> for Uint<BITS, LIMBS>

§

fn shl_assign(&mut self, rhs: u8)

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign<usize> for Uint<BITS, LIMBS>

§

fn shl_assign(&mut self, rhs: usize)

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShlAssign for Uint<BITS, LIMBS>

§

fn shl_assign(&mut self, rhs: Uint<BITS, LIMBS>)

Performs the <<= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr( self, rhs: &Uint<BITS, LIMBS>, ) -> <Uint<BITS, LIMBS> as Shr<&Uint<BITS, LIMBS>>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<&i16> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: &i16) -> <Uint<BITS, LIMBS> as Shr<&i16>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<&i32> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: &i32) -> <Uint<BITS, LIMBS> as Shr<&i32>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<&i64> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: &i64) -> <Uint<BITS, LIMBS> as Shr<&i64>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<&i8> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: &i8) -> <Uint<BITS, LIMBS> as Shr<&i8>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<&isize> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: &isize) -> <Uint<BITS, LIMBS> as Shr<&isize>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<&u16> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: &u16) -> <Uint<BITS, LIMBS> as Shr<&u16>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<&u32> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: &u32) -> <Uint<BITS, LIMBS> as Shr<&u32>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<&u64> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: &u64) -> <Uint<BITS, LIMBS> as Shr<&u64>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<&u8> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: &u8) -> <Uint<BITS, LIMBS> as Shr<&u8>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<&usize> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: &usize) -> <Uint<BITS, LIMBS> as Shr<&usize>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<i16> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: i16) -> <Uint<BITS, LIMBS> as Shr<i16>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<i32> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: i32) -> <Uint<BITS, LIMBS> as Shr<i32>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<i64> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: i64) -> <Uint<BITS, LIMBS> as Shr<i64>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<i8> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: i8) -> <Uint<BITS, LIMBS> as Shr<i8>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<isize> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: isize) -> <Uint<BITS, LIMBS> as Shr<isize>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<u16> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: u16) -> <Uint<BITS, LIMBS> as Shr<u16>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<u32> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: u32) -> <Uint<BITS, LIMBS> as Shr<u32>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<u64> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: u64) -> <Uint<BITS, LIMBS> as Shr<u64>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<u8> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: u8) -> <Uint<BITS, LIMBS> as Shr<u8>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr<usize> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: usize) -> <Uint<BITS, LIMBS> as Shr<usize>>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Shr for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the >> operator.
§

fn shr(self, rhs: Uint<BITS, LIMBS>) -> <Uint<BITS, LIMBS> as Shr>::Output

Performs the >> operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

fn shr_assign(&mut self, rhs: &Uint<BITS, LIMBS>)

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<&i16> for Uint<BITS, LIMBS>

§

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

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<&i32> for Uint<BITS, LIMBS>

§

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

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<&i64> for Uint<BITS, LIMBS>

§

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

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<&i8> for Uint<BITS, LIMBS>

§

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

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<&isize> for Uint<BITS, LIMBS>

§

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

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<&u16> for Uint<BITS, LIMBS>

§

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

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<&u32> for Uint<BITS, LIMBS>

§

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

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<&u64> for Uint<BITS, LIMBS>

§

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

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<&u8> for Uint<BITS, LIMBS>

§

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

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<&usize> for Uint<BITS, LIMBS>

§

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

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<i16> for Uint<BITS, LIMBS>

§

fn shr_assign(&mut self, rhs: i16)

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<i32> for Uint<BITS, LIMBS>

§

fn shr_assign(&mut self, rhs: i32)

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<i64> for Uint<BITS, LIMBS>

§

fn shr_assign(&mut self, rhs: i64)

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<i8> for Uint<BITS, LIMBS>

§

fn shr_assign(&mut self, rhs: i8)

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<isize> for Uint<BITS, LIMBS>

§

fn shr_assign(&mut self, rhs: isize)

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<u16> for Uint<BITS, LIMBS>

§

fn shr_assign(&mut self, rhs: u16)

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<u32> for Uint<BITS, LIMBS>

§

fn shr_assign(&mut self, rhs: u32)

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<u64> for Uint<BITS, LIMBS>

§

fn shr_assign(&mut self, rhs: u64)

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<u8> for Uint<BITS, LIMBS>

§

fn shr_assign(&mut self, rhs: u8)

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign<usize> for Uint<BITS, LIMBS>

§

fn shr_assign(&mut self, rhs: usize)

Performs the >>= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> ShrAssign for Uint<BITS, LIMBS>

§

fn shr_assign(&mut self, rhs: Uint<BITS, LIMBS>)

Performs the >>= operation. Read more
§

impl SolValue for Uint<104, 2>

§

type SolType = Uint<104>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<112, 2>

§

type SolType = Uint<112>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<120, 2>

§

type SolType = Uint<120>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<136, 3>

§

type SolType = Uint<136>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<144, 3>

§

type SolType = Uint<144>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<152, 3>

§

type SolType = Uint<152>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<160, 3>

§

type SolType = Uint<160>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<168, 3>

§

type SolType = Uint<168>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<176, 3>

§

type SolType = Uint<176>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<184, 3>

§

type SolType = Uint<184>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<192, 3>

§

type SolType = Uint<192>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<200, 4>

§

type SolType = Uint<200>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<208, 4>

§

type SolType = Uint<208>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<216, 4>

§

type SolType = Uint<216>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<224, 4>

§

type SolType = Uint<224>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<232, 4>

§

type SolType = Uint<232>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<24, 1>

§

type SolType = Uint<24>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<240, 4>

§

type SolType = Uint<240>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<248, 4>

§

type SolType = Uint<248>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<256, 4>

§

type SolType = Uint<256>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<40, 1>

§

type SolType = Uint<40>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<48, 1>

§

type SolType = Uint<48>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<56, 1>

§

type SolType = Uint<56>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<72, 2>

§

type SolType = Uint<72>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<80, 2>

§

type SolType = Uint<80>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<88, 2>

§

type SolType = Uint<88>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl SolValue for Uint<96, 2>

§

type SolType = Uint<96>

The Solidity type that this type corresponds to.
§

fn sol_name(&self) -> &'static str

The name of the associated Solidity type. Read more
§

fn sol_type_name(&self) -> Cow<'static, str>

👎Deprecated since 0.6.3: use sol_name instead
The name of the associated Solidity type. Read more
§

fn tokenize(&self) -> <Self::SolType as SolType>::Token<'_>

Tokenizes the given value into this type’s token. Read more
§

fn detokenize(token: <Self::SolType as SolType>::Token<'_>) -> Self
where Self: From<<Self::SolType as SolType>::RustType>,

Detokenize a value from the given token. Read more
§

fn abi_encoded_size(&self) -> usize

Calculate the ABI-encoded size of the data. Read more
§

fn eip712_data_word(&self) -> FixedBytes<32>

Encode this data according to EIP-712 encodeData rules, and hash it if necessary. Read more
§

fn abi_encode_packed_to(&self, out: &mut Vec<u8>)

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode_packed(&self) -> Vec<u8>

Non-standard Packed Mode ABI encoding. Read more
§

fn abi_encode(&self) -> Vec<u8>

ABI-encodes the value. Read more
§

fn abi_encode_sequence(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence. Read more
§

fn abi_encode_params(&self) -> Vec<u8>
where <Self::SolType as SolType>::Token<'a>: for<'a> TokenSeq<'a>,

Encodes an ABI sequence suitable for function parameters. Read more
§

fn abi_decode(data: &[u8], validate: bool) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_params<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

fn abi_decode_sequence<'de>( data: &'de [u8], validate: bool, ) -> Result<Self, Error>
where Self: From<<Self::SolType as SolType>::RustType>, <Self::SolType as SolType>::Token<'de>: TokenSeq<'de>,

ABI-decode this type from the given data. Read more
§

impl<const BITS: usize, const LIMBS: usize> Sub<&Uint<BITS, LIMBS>> for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the - operator.
§

fn sub( self, rhs: &Uint<BITS, LIMBS>, ) -> <&Uint<BITS, LIMBS> as Sub<&Uint<BITS, LIMBS>>>::Output

Performs the - operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Sub<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the - operator.
§

fn sub( self, rhs: &Uint<BITS, LIMBS>, ) -> <Uint<BITS, LIMBS> as Sub<&Uint<BITS, LIMBS>>>::Output

Performs the - operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Sub<Uint<BITS, LIMBS>> for &Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the - operator.
§

fn sub( self, rhs: Uint<BITS, LIMBS>, ) -> <&Uint<BITS, LIMBS> as Sub<Uint<BITS, LIMBS>>>::Output

Performs the - operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> Sub for Uint<BITS, LIMBS>

§

type Output = Uint<BITS, LIMBS>

The resulting type after applying the - operator.
§

fn sub(self, rhs: Uint<BITS, LIMBS>) -> <Uint<BITS, LIMBS> as Sub>::Output

Performs the - operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> SubAssign<&Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

fn sub_assign(&mut self, rhs: &Uint<BITS, LIMBS>)

Performs the -= operation. Read more
§

impl<const BITS: usize, const LIMBS: usize> SubAssign for Uint<BITS, LIMBS>

§

fn sub_assign(&mut self, rhs: Uint<BITS, LIMBS>)

Performs the -= operation. Read more
§

impl<'a, const BITS: usize, const LIMBS: usize> Sum<&'a Uint<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

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

Takes an iterator and generates Self from the elements by “summing up” the items.
§

impl<const BITS: usize, const LIMBS: usize> Sum for Uint<BITS, LIMBS>

§

fn sum<I>(iter: I) -> Uint<BITS, LIMBS>
where I: Iterator<Item = Uint<BITS, LIMBS>>,

Takes an iterator and generates Self from the elements by “summing up” the items.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<&Uint<BITS, LIMBS>> for bool

§

type Error = FromUintError<bool>

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

fn try_from( value: &Uint<BITS, LIMBS>, ) -> Result<bool, <bool as TryFrom<&Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<&Uint<BITS, LIMBS>> for i128

§

type Error = FromUintError<i128>

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

fn try_from( value: &Uint<BITS, LIMBS>, ) -> Result<i128, <i128 as TryFrom<&Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<&Uint<BITS, LIMBS>> for i16

§

type Error = FromUintError<i16>

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

fn try_from( value: &Uint<BITS, LIMBS>, ) -> Result<i16, <i16 as TryFrom<&Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<&Uint<BITS, LIMBS>> for i32

§

type Error = FromUintError<i32>

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

fn try_from( value: &Uint<BITS, LIMBS>, ) -> Result<i32, <i32 as TryFrom<&Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<&Uint<BITS, LIMBS>> for i64

§

type Error = FromUintError<i64>

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

fn try_from( value: &Uint<BITS, LIMBS>, ) -> Result<i64, <i64 as TryFrom<&Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<&Uint<BITS, LIMBS>> for i8

§

type Error = FromUintError<i8>

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

fn try_from( value: &Uint<BITS, LIMBS>, ) -> Result<i8, <i8 as TryFrom<&Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<&Uint<BITS, LIMBS>> for isize

§

type Error = FromUintError<isize>

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

fn try_from( value: &Uint<BITS, LIMBS>, ) -> Result<isize, <isize as TryFrom<&Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<&Uint<BITS, LIMBS>> for u128

§

type Error = FromUintError<u128>

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

fn try_from( value: &Uint<BITS, LIMBS>, ) -> Result<u128, <u128 as TryFrom<&Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<&Uint<BITS, LIMBS>> for u16

§

type Error = FromUintError<u16>

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

fn try_from( value: &Uint<BITS, LIMBS>, ) -> Result<u16, <u16 as TryFrom<&Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<&Uint<BITS, LIMBS>> for u32

§

type Error = FromUintError<u32>

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

fn try_from( value: &Uint<BITS, LIMBS>, ) -> Result<u32, <u32 as TryFrom<&Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<&Uint<BITS, LIMBS>> for u64

§

type Error = FromUintError<u64>

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

fn try_from( value: &Uint<BITS, LIMBS>, ) -> Result<u64, <u64 as TryFrom<&Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<&Uint<BITS, LIMBS>> for u8

§

type Error = FromUintError<u8>

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

fn try_from( value: &Uint<BITS, LIMBS>, ) -> Result<u8, <u8 as TryFrom<&Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<&Uint<BITS, LIMBS>> for usize

§

type Error = FromUintError<usize>

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

fn try_from( value: &Uint<BITS, LIMBS>, ) -> Result<usize, <usize as TryFrom<&Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<Signed<BITS, LIMBS>> for Uint<BITS, LIMBS>

§

type Error = BigIntConversionError

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

fn try_from( value: Signed<BITS, LIMBS>, ) -> Result<Uint<BITS, LIMBS>, <Uint<BITS, LIMBS> as TryFrom<Signed<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl TryFrom<StringifiedNumeric> for Uint<256, 4>

§

type Error = String

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

fn try_from( value: StringifiedNumeric, ) -> Result<Uint<256, 4>, <Uint<256, 4> as TryFrom<StringifiedNumeric>>::Error>

Performs the conversion.
§

impl TryFrom<StringifiedNumeric> for Uint<64, 1>

§

type Error = String

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

fn try_from( value: StringifiedNumeric, ) -> Result<Uint<64, 1>, <Uint<64, 1> as TryFrom<StringifiedNumeric>>::Error>

Performs the conversion.
Source§

impl TryFrom<Uint<256, 4>> for Base

Source§

type Error = Report

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

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

Performs the conversion.
§

impl TryFrom<Uint<64, 1>> for Parity

§

type Error = <Parity as TryFrom<u64>>::Error

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

fn try_from( value: Uint<64, 1>, ) -> Result<Parity, <Parity as TryFrom<Uint<64, 1>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<Uint<BITS, LIMBS>> for Signed<BITS, LIMBS>

§

type Error = BigIntConversionError

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

fn try_from( from: Uint<BITS, LIMBS>, ) -> Result<Signed<BITS, LIMBS>, <Signed<BITS, LIMBS> as TryFrom<Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<Uint<BITS, LIMBS>> for bool

§

type Error = FromUintError<bool>

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

fn try_from( value: Uint<BITS, LIMBS>, ) -> Result<bool, <bool as TryFrom<Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<Uint<BITS, LIMBS>> for i128

§

type Error = FromUintError<i128>

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

fn try_from( value: Uint<BITS, LIMBS>, ) -> Result<i128, <i128 as TryFrom<Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<Uint<BITS, LIMBS>> for i16

§

type Error = FromUintError<i16>

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

fn try_from( value: Uint<BITS, LIMBS>, ) -> Result<i16, <i16 as TryFrom<Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<Uint<BITS, LIMBS>> for i32

§

type Error = FromUintError<i32>

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

fn try_from( value: Uint<BITS, LIMBS>, ) -> Result<i32, <i32 as TryFrom<Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<Uint<BITS, LIMBS>> for i64

§

type Error = FromUintError<i64>

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

fn try_from( value: Uint<BITS, LIMBS>, ) -> Result<i64, <i64 as TryFrom<Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<Uint<BITS, LIMBS>> for i8

§

type Error = FromUintError<i8>

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

fn try_from( value: Uint<BITS, LIMBS>, ) -> Result<i8, <i8 as TryFrom<Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<Uint<BITS, LIMBS>> for isize

§

type Error = FromUintError<isize>

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

fn try_from( value: Uint<BITS, LIMBS>, ) -> Result<isize, <isize as TryFrom<Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<Uint<BITS, LIMBS>> for u128

§

type Error = FromUintError<u128>

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

fn try_from( value: Uint<BITS, LIMBS>, ) -> Result<u128, <u128 as TryFrom<Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<Uint<BITS, LIMBS>> for u16

§

type Error = FromUintError<u16>

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

fn try_from( value: Uint<BITS, LIMBS>, ) -> Result<u16, <u16 as TryFrom<Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<Uint<BITS, LIMBS>> for u32

§

type Error = FromUintError<u32>

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

fn try_from( value: Uint<BITS, LIMBS>, ) -> Result<u32, <u32 as TryFrom<Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<Uint<BITS, LIMBS>> for u64

§

type Error = FromUintError<u64>

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

fn try_from( value: Uint<BITS, LIMBS>, ) -> Result<u64, <u64 as TryFrom<Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<Uint<BITS, LIMBS>> for u8

§

type Error = FromUintError<u8>

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

fn try_from( value: Uint<BITS, LIMBS>, ) -> Result<u8, <u8 as TryFrom<Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<Uint<BITS, LIMBS>> for usize

§

type Error = FromUintError<usize>

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

fn try_from( value: Uint<BITS, LIMBS>, ) -> Result<usize, <usize as TryFrom<Uint<BITS, LIMBS>>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<bool> for Uint<BITS, LIMBS>

§

type Error = ToUintError<Uint<BITS, LIMBS>>

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

fn try_from( value: bool, ) -> Result<Uint<BITS, LIMBS>, <Uint<BITS, LIMBS> as TryFrom<bool>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<f32> for Uint<BITS, LIMBS>

Available on crate feature std only.
§

type Error = ToUintError<Uint<BITS, LIMBS>>

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

fn try_from( value: f32, ) -> Result<Uint<BITS, LIMBS>, <Uint<BITS, LIMBS> as TryFrom<f32>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<f64> for Uint<BITS, LIMBS>

Available on crate feature std only.
§

type Error = ToUintError<Uint<BITS, LIMBS>>

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

fn try_from( value: f64, ) -> Result<Uint<BITS, LIMBS>, <Uint<BITS, LIMBS> as TryFrom<f64>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<i128> for Uint<BITS, LIMBS>

§

type Error = ToUintError<Uint<BITS, LIMBS>>

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

fn try_from( value: i128, ) -> Result<Uint<BITS, LIMBS>, <Uint<BITS, LIMBS> as TryFrom<i128>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<i16> for Uint<BITS, LIMBS>

§

type Error = ToUintError<Uint<BITS, LIMBS>>

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

fn try_from( value: i16, ) -> Result<Uint<BITS, LIMBS>, <Uint<BITS, LIMBS> as TryFrom<i16>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<i32> for Uint<BITS, LIMBS>

§

type Error = ToUintError<Uint<BITS, LIMBS>>

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

fn try_from( value: i32, ) -> Result<Uint<BITS, LIMBS>, <Uint<BITS, LIMBS> as TryFrom<i32>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<i64> for Uint<BITS, LIMBS>

§

type Error = ToUintError<Uint<BITS, LIMBS>>

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

fn try_from( value: i64, ) -> Result<Uint<BITS, LIMBS>, <Uint<BITS, LIMBS> as TryFrom<i64>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<i8> for Uint<BITS, LIMBS>

§

type Error = ToUintError<Uint<BITS, LIMBS>>

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

fn try_from( value: i8, ) -> Result<Uint<BITS, LIMBS>, <Uint<BITS, LIMBS> as TryFrom<i8>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<isize> for Uint<BITS, LIMBS>

§

type Error = ToUintError<Uint<BITS, LIMBS>>

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

fn try_from( value: isize, ) -> Result<Uint<BITS, LIMBS>, <Uint<BITS, LIMBS> as TryFrom<isize>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<u128> for Uint<BITS, LIMBS>

§

type Error = ToUintError<Uint<BITS, LIMBS>>

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

fn try_from( value: u128, ) -> Result<Uint<BITS, LIMBS>, <Uint<BITS, LIMBS> as TryFrom<u128>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<u16> for Uint<BITS, LIMBS>

§

type Error = ToUintError<Uint<BITS, LIMBS>>

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

fn try_from( value: u16, ) -> Result<Uint<BITS, LIMBS>, <Uint<BITS, LIMBS> as TryFrom<u16>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<u32> for Uint<BITS, LIMBS>

§

type Error = ToUintError<Uint<BITS, LIMBS>>

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

fn try_from( value: u32, ) -> Result<Uint<BITS, LIMBS>, <Uint<BITS, LIMBS> as TryFrom<u32>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<u64> for Uint<BITS, LIMBS>

§

type Error = ToUintError<Uint<BITS, LIMBS>>

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

fn try_from( value: u64, ) -> Result<Uint<BITS, LIMBS>, <Uint<BITS, LIMBS> as TryFrom<u64>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<u8> for Uint<BITS, LIMBS>

§

type Error = ToUintError<Uint<BITS, LIMBS>>

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

fn try_from( value: u8, ) -> Result<Uint<BITS, LIMBS>, <Uint<BITS, LIMBS> as TryFrom<u8>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> TryFrom<usize> for Uint<BITS, LIMBS>

§

type Error = ToUintError<Uint<BITS, LIMBS>>

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

fn try_from( value: usize, ) -> Result<Uint<BITS, LIMBS>, <Uint<BITS, LIMBS> as TryFrom<usize>>::Error>

Performs the conversion.
§

impl<const BITS: usize, const LIMBS: usize> UIfmt for Uint<BITS, LIMBS>

§

fn pretty(&self) -> String

Return a prettified string version of the value
§

impl<const BITS: usize, const LIMBS: usize> UpperHex for Uint<BITS, LIMBS>

§

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

Formats the value using the given formatter. Read more
§

impl<const BITS: usize, const LIMBS: usize> Copy for Uint<BITS, LIMBS>

§

impl<const BITS: usize, const LIMBS: usize> Eq for Uint<BITS, LIMBS>

§

impl MaxEncodedLen<ruint::::support::alloy_rlp::_::{impl#0}::{constant#0}> for Uint<ruint::::support::alloy_rlp::_::{impl#0}::{constant#1}, ruint::::support::alloy_rlp::_::{impl#0}::{constant#2}>

§

impl MaxEncodedLen<ruint::::support::alloy_rlp::_::{impl#1}::{constant#0}> for Uint<ruint::::support::alloy_rlp::_::{impl#1}::{constant#1}, ruint::::support::alloy_rlp::_::{impl#1}::{constant#2}>

§

impl MaxEncodedLen<ruint::::support::alloy_rlp::_::{impl#10}::{constant#0}> for Uint<ruint::::support::alloy_rlp::_::{impl#10}::{constant#1}, ruint::::support::alloy_rlp::_::{impl#10}::{constant#2}>

§

impl MaxEncodedLen<ruint::::support::alloy_rlp::_::{impl#11}::{constant#0}> for Uint<ruint::::support::alloy_rlp::_::{impl#11}::{constant#1}, ruint::::support::alloy_rlp::_::{impl#11}::{constant#2}>

§

impl MaxEncodedLen<ruint::::support::alloy_rlp::_::{impl#12}::{constant#0}> for Uint<ruint::::support::alloy_rlp::_::{impl#12}::{constant#1}, ruint::::support::alloy_rlp::_::{impl#12}::{constant#2}>

§

impl MaxEncodedLen<ruint::::support::alloy_rlp::_::{impl#13}::{constant#0}> for Uint<ruint::::support::alloy_rlp::_::{impl#13}::{constant#1}, ruint::::support::alloy_rlp::_::{impl#13}::{constant#2}>

§

impl MaxEncodedLen<ruint::::support::alloy_rlp::_::{impl#2}::{constant#0}> for Uint<ruint::::support::alloy_rlp::_::{impl#2}::{constant#1}, ruint::::support::alloy_rlp::_::{impl#2}::{constant#2}>

§

impl MaxEncodedLen<ruint::::support::alloy_rlp::_::{impl#3}::{constant#0}> for Uint<ruint::::support::alloy_rlp::_::{impl#3}::{constant#1}, ruint::::support::alloy_rlp::_::{impl#3}::{constant#2}>

§

impl MaxEncodedLen<ruint::::support::alloy_rlp::_::{impl#4}::{constant#0}> for Uint<ruint::::support::alloy_rlp::_::{impl#4}::{constant#1}, ruint::::support::alloy_rlp::_::{impl#4}::{constant#2}>

§

impl MaxEncodedLen<ruint::::support::alloy_rlp::_::{impl#5}::{constant#0}> for Uint<ruint::::support::alloy_rlp::_::{impl#5}::{constant#1}, ruint::::support::alloy_rlp::_::{impl#5}::{constant#2}>

§

impl MaxEncodedLen<ruint::::support::alloy_rlp::_::{impl#6}::{constant#0}> for Uint<ruint::::support::alloy_rlp::_::{impl#6}::{constant#1}, ruint::::support::alloy_rlp::_::{impl#6}::{constant#2}>

§

impl MaxEncodedLen<ruint::::support::alloy_rlp::_::{impl#7}::{constant#0}> for Uint<ruint::::support::alloy_rlp::_::{impl#7}::{constant#1}, ruint::::support::alloy_rlp::_::{impl#7}::{constant#2}>

§

impl MaxEncodedLen<ruint::::support::alloy_rlp::_::{impl#8}::{constant#0}> for Uint<ruint::::support::alloy_rlp::_::{impl#8}::{constant#1}, ruint::::support::alloy_rlp::_::{impl#8}::{constant#2}>

§

impl MaxEncodedLen<ruint::::support::alloy_rlp::_::{impl#9}::{constant#0}> for Uint<ruint::::support::alloy_rlp::_::{impl#9}::{constant#1}, ruint::::support::alloy_rlp::_::{impl#9}::{constant#2}>

§

impl<const BITS: usize, const LIMBS: usize> StructuralPartialEq for Uint<BITS, LIMBS>

§

impl<const BITS: usize, const LIMBS: usize, T> UintTryFrom<T> for Uint<BITS, LIMBS>
where Uint<BITS, LIMBS>: TryFrom<T, Error = ToUintError<Uint<BITS, LIMBS>>>,

Blanket implementation for any type that implements TryFrom<Uint>.

§

impl<const BITS: usize, const LIMBS: usize, const BITS_SRC: usize, const LIMBS_SRC: usize> UintTryFrom<Uint<BITS_SRC, LIMBS_SRC>> for Uint<BITS, LIMBS>

§

impl<const BITS: usize, const LIMBS: usize, T> UintTryTo<T> for Uint<BITS, LIMBS>
where T: for<'a> TryFrom<&'a Uint<BITS, LIMBS>, Error = FromUintError<T>>,

§

impl<const BITS: usize, const LIMBS: usize, const BITS_DST: usize, const LIMBS_DST: usize> UintTryTo<Uint<BITS_DST, LIMBS_DST>> for Uint<BITS, LIMBS>

Auto Trait Implementations§

§

impl<const BITS: usize, const LIMBS: usize> Freeze for Uint<BITS, LIMBS>

§

impl<const BITS: usize, const LIMBS: usize> RefUnwindSafe for Uint<BITS, LIMBS>

§

impl<const BITS: usize, const LIMBS: usize> Send for Uint<BITS, LIMBS>

§

impl<const BITS: usize, const LIMBS: usize> Sync for Uint<BITS, LIMBS>

§

impl<const BITS: usize, const LIMBS: usize> Unpin for Uint<BITS, LIMBS>

§

impl<const BITS: usize, const LIMBS: usize> UnwindSafe for Uint<BITS, LIMBS>

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
§

impl<T> AsOut<T> for T
where T: Copy,

§

fn as_out(&mut self) -> Out<'_, T>

Returns an out reference to self.
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
§

impl<T, R> CollectAndApply<T, R> for T

§

fn collect_and_apply<I, F>(iter: I, f: F) -> R
where I: Iterator<Item = T>, F: FnOnce(&[T]) -> R,

Equivalent to f(&iter.collect::<Vec<_>>()).

§

type Output = R

§

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

§

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

Compare self to key and return their ordering.
§

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

§

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

Compares self to key and returns their ordering.
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

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

§

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

§

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

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

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

§

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

Compares self to key and returns true if they are equal.
§

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

§

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

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

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

§

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

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

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

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

fn in_current_span(self) -> Instrumented<Self>

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

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
§

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

§

fn fg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the foreground set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like red() and green(), which have the same functionality but are pithier.

§Example

Set foreground color to white using fg():

use yansi::{Paint, Color};

painted.fg(Color::White);

Set foreground color to white using white().

use yansi::Paint;

painted.white();
§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color::Primary].

§Example
println!("{}", value.primary());
§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color::Fixed].

§Example
println!("{}", value.fixed(color));
§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color::Rgb].

§Example
println!("{}", value.rgb(r, g, b));
§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color::Black].

§Example
println!("{}", value.black());
§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color::Red].

§Example
println!("{}", value.red());
§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color::Green].

§Example
println!("{}", value.green());
§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color::Yellow].

§Example
println!("{}", value.yellow());
§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color::Blue].

§Example
println!("{}", value.blue());
§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color::Magenta].

§Example
println!("{}", value.magenta());
§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color::Cyan].

§Example
println!("{}", value.cyan());
§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color::White].

§Example
println!("{}", value.white());
§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color::BrightBlack].

§Example
println!("{}", value.bright_black());
§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color::BrightRed].

§Example
println!("{}", value.bright_red());
§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color::BrightGreen].

§Example
println!("{}", value.bright_green());
§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color::BrightYellow].

§Example
println!("{}", value.bright_yellow());
§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color::BrightBlue].

§Example
println!("{}", value.bright_blue());
§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color::BrightMagenta].

§Example
println!("{}", value.bright_magenta());
§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color::BrightCyan].

§Example
println!("{}", value.bright_cyan());
§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color::BrightWhite].

§Example
println!("{}", value.bright_white());
§

fn bg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the background set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like on_red() and on_green(), which have the same functionality but are pithier.

§Example

Set background color to red using fg():

use yansi::{Paint, Color};

painted.bg(Color::Red);

Set background color to red using on_red().

use yansi::Paint;

painted.on_red();
§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to [Color::Primary].

§Example
println!("{}", value.on_primary());
§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color::Fixed].

§Example
println!("{}", value.on_fixed(color));
§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color::Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color::Black].

§Example
println!("{}", value.on_black());
§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color::Red].

§Example
println!("{}", value.on_red());
§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color::Green].

§Example
println!("{}", value.on_green());
§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color::Yellow].

§Example
println!("{}", value.on_yellow());
§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color::Blue].

§Example
println!("{}", value.on_blue());
§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color::Magenta].

§Example
println!("{}", value.on_magenta());
§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color::Cyan].

§Example
println!("{}", value.on_cyan());
§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color::White].

§Example
println!("{}", value.on_white());
§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color::BrightBlack].

§Example
println!("{}", value.on_bright_black());
§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color::BrightRed].

§Example
println!("{}", value.on_bright_red());
§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color::BrightGreen].

§Example
println!("{}", value.on_bright_green());
§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color::BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color::BrightBlue].

§Example
println!("{}", value.on_bright_blue());
§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color::BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color::BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color::BrightWhite].

§Example
println!("{}", value.on_bright_white());
§

fn attr(&self, value: Attribute) -> Painted<&T>

Enables the styling [Attribute] value.

This method should be used rarely. Instead, prefer to use attribute-specific builder methods like bold() and underline(), which have the same functionality but are pithier.

§Example

Make text bold using attr():

use yansi::{Paint, Attribute};

painted.attr(Attribute::Bold);

Make text bold using using bold().

use yansi::Paint;

painted.bold();
§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute::Bold].

§Example
println!("{}", value.bold());
§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute::Dim].

§Example
println!("{}", value.dim());
§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute::Italic].

§Example
println!("{}", value.italic());
§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute::Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute::Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute::RapidBlink].

§Example
println!("{}", value.rapid_blink());
§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute::Invert].

§Example
println!("{}", value.invert());
§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute::Conceal].

§Example
println!("{}", value.conceal());
§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute::Strike].

§Example
println!("{}", value.strike());
§

fn quirk(&self, value: Quirk) -> Painted<&T>

Enables the yansi [Quirk] value.

This method should be used rarely. Instead, prefer to use quirk-specific builder methods like mask() and wrap(), which have the same functionality but are pithier.

§Example

Enable wrapping using .quirk():

use yansi::{Paint, Quirk};

painted.quirk(Quirk::Wrap);

Enable wrapping using wrap().

use yansi::Paint;

painted.wrap();
§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk::Mask].

§Example
println!("{}", value.mask());
§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk::Wrap].

§Example
println!("{}", value.wrap());
§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk::Linger].

§Example
println!("{}", value.linger());
§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to [Quirk::Clear].

§Example
println!("{}", value.clear());
§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk::Resetting].

§Example
println!("{}", value.resetting());
§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk::Bright].

§Example
println!("{}", value.bright());
§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk::OnBright].

§Example
println!("{}", value.on_bright());
§

fn whenever(&self, value: Condition) -> Painted<&T>

Conditionally enable styling based on whether the [Condition] value applies. Replaces any previous condition.

See the crate level docs for more details.

§Example

Enable styling painted only when both stdout and stderr are TTYs:

use yansi::{Paint, Condition};

painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);
§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new [Painted] with a default [Style]. Read more
§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
§

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

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
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§

default fn to_string(&self) -> String

Converts the given value to a String. Read more
§

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

§

fn try_clone(&self) -> Result<T, Error>

Clones self, possibly returning an error.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. 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.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

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

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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

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

§

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

§

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

§

impl<T, Rhs, Output> GroupOpsOwned<Rhs, Output> for T
where T: for<'r> GroupOps<&'r Rhs, Output>,

§

impl<T> MaybeSendSync for T

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

§

impl<T> RpcObject for T
where T: RpcParam + RpcReturn,

§

impl<T> RpcParam for T
where T: Serialize + Clone + Debug + Send + Sync + Unpin,

§

impl<T> RpcReturn for T
where T: DeserializeOwned + Debug + Send + Sync + Unpin + 'static,

§

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

§

impl<T, Rhs, Output> ScalarMulOwned<Rhs, Output> for T
where T: for<'r> ScalarMul<&'r Rhs, Output>,

Layout§

Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.