pub struct U256 { /* private fields */ }Expand description
A 256-bit unsigned integer.
Limbs are least-significant-first in memory; the wire encoding is
most-significant-first (see integration), matching xdrs’ u128.
Implementations§
Source§impl U256
impl U256
Sourcepub const fn overflowing_add(self, rhs: U256) -> (U256, bool)
pub const fn overflowing_add(self, rhs: U256) -> (U256, bool)
Wrapping addition, with a flag reporting whether it wrapped.
This is OpenZeppelin’s Math.add512, which returns the 512-bit sum as
(high, low) because Solidity has no wider type and no bool-carrying
tuple: its high is the carry, always zero or one. Here the carry is
the flag, so (low, carry) carries the same information the other way
round – widen it with U256::from(carry) if you need the high word as
a value.
Sourcepub const fn overflowing_sub(self, rhs: U256) -> (U256, bool)
pub const fn overflowing_sub(self, rhs: U256) -> (U256, bool)
Wrapping subtraction, with a flag reporting whether it wrapped.
Sourcepub const fn checked_add(self, rhs: U256) -> Option<U256>
pub const fn checked_add(self, rhs: U256) -> Option<U256>
Addition, returning None on overflow.
Sourcepub const fn checked_sub(self, rhs: U256) -> Option<U256>
pub const fn checked_sub(self, rhs: U256) -> Option<U256>
Subtraction, returning None on overflow.
Sourcepub const fn wrapping_add(self, rhs: U256) -> U256
pub const fn wrapping_add(self, rhs: U256) -> U256
Addition, wrapping on overflow.
Sourcepub const fn wrapping_sub(self, rhs: U256) -> U256
pub const fn wrapping_sub(self, rhs: U256) -> U256
Subtraction, wrapping on overflow.
Sourcepub const fn saturating_add(self, rhs: U256) -> U256
pub const fn saturating_add(self, rhs: U256) -> U256
Addition, saturating at U256::MAX.
Sourcepub const fn saturating_sub(self, rhs: U256) -> U256
pub const fn saturating_sub(self, rhs: U256) -> U256
Subtraction, saturating at U256::ZERO.
Sourcepub const fn overflowing_neg(self) -> (U256, bool)
pub const fn overflowing_neg(self) -> (U256, bool)
Negation, with a flag reporting whether it wrapped.
Everything but zero wraps – there are no negative values here. The
wrapped result is the two’s complement, which is what
I256 is built on.
Sourcepub const fn checked_neg(self) -> Option<U256>
pub const fn checked_neg(self) -> Option<U256>
Negation, returning None for every value but zero.
Sourcepub const fn wrapping_neg(self) -> U256
pub const fn wrapping_neg(self) -> U256
Negation, wrapping: the two’s complement of self.
Sourcepub const fn widening_mul_u128(a: u128, b: u128) -> U256
pub const fn widening_mul_u128(a: u128, b: u128) -> U256
The exact 256-bit product of two 128-bit values.
The shape that dominates real call sites (a * b / c over token
amounts). Cannot overflow, so no check and no Option; sixteen
mul/mulhu pairs.
Sourcepub const fn widening_mul(self, rhs: U256) -> (U256, U256)
pub const fn widening_mul(self, rhs: U256) -> (U256, U256)
The exact 512-bit product of two U256s, as (low, high).
Halves are ordered low-first, matching u128::widening_mul.
OpenZeppelin’s Math.mul512 returns them the other way round.
Cannot overflow, so no check and no Option; sixty-four mul/mulhu
pairs. This is the intermediate the full-precision
mul_div family divides back down – reach for that
rather than for the halves, unless the 512-bit value is the answer.
Sourcepub const fn overflowing_mul_u32(self, rhs: u32) -> (U256, bool)
pub const fn overflowing_mul_u32(self, rhs: u32) -> (U256, bool)
Multiplication by a 32-bit value, with a flag reporting overflow.
Separate from the general 256x256 multiply so scaling by a small constant does not drag the schoolbook loop in.
Sourcepub const fn overflowing_mul(self, rhs: U256) -> (U256, bool)
pub const fn overflowing_mul(self, rhs: U256) -> (U256, bool)
Wrapping multiplication, with a flag reporting whether it wrapped.
Outlined on rv32; see U256::widening_mul_u128 and the note at the top of
this module.
Sourcepub const fn checked_mul(self, rhs: U256) -> Option<U256>
pub const fn checked_mul(self, rhs: U256) -> Option<U256>
Multiplication, returning None on overflow.
Sourcepub const fn wrapping_mul(self, rhs: U256) -> U256
pub const fn wrapping_mul(self, rhs: U256) -> U256
Multiplication, wrapping on overflow.
Sourcepub const fn saturating_mul(self, rhs: U256) -> U256
pub const fn saturating_mul(self, rhs: U256) -> U256
Multiplication, saturating at U256::MAX.
Sourcepub const fn const_bitand(self, rhs: U256) -> U256
pub const fn const_bitand(self, rhs: U256) -> U256
Bitwise AND, usable from a const fn.
Sourcepub const fn const_bitor(self, rhs: U256) -> U256
pub const fn const_bitor(self, rhs: U256) -> U256
Bitwise OR, usable from a const fn.
Sourcepub const fn const_bitxor(self, rhs: U256) -> U256
pub const fn const_bitxor(self, rhs: U256) -> U256
Bitwise XOR, usable from a const fn.
Sourcepub const fn overflowing_shl(self, n: u32) -> (U256, bool)
pub const fn overflowing_shl(self, n: u32) -> (U256, bool)
Left shift, masking the shift amount to 0..256 and reporting whether
the mask changed it. Mirrors u128::overflowing_shl.
Sourcepub const fn wrapping_shl(self, n: u32) -> U256
pub const fn wrapping_shl(self, n: u32) -> U256
Left shift, masking the shift amount to 0..256.
Sourcepub const fn checked_shl(self, n: u32) -> Option<U256>
pub const fn checked_shl(self, n: u32) -> Option<U256>
Left shift, returning None if the shift amount is at least 256.
Sourcepub const fn overflowing_shr(self, n: u32) -> (U256, bool)
pub const fn overflowing_shr(self, n: u32) -> (U256, bool)
Right shift, masking the shift amount to 0..256 and reporting whether
the mask changed it. Mirrors u128::overflowing_shr.
Sourcepub const fn wrapping_shr(self, n: u32) -> U256
pub const fn wrapping_shr(self, n: u32) -> U256
Right shift, masking the shift amount to 0..256.
Sourcepub const fn checked_shr(self, n: u32) -> Option<U256>
pub const fn checked_shr(self, n: u32) -> Option<U256>
Right shift, returning None if the shift amount is at least 256.
Source§impl U256
impl U256
Sourcepub const fn div_rem_small(self, rhs: u32) -> (U256, u32)
pub const fn div_rem_small(self, rhs: u32) -> (U256, u32)
Sourcepub const fn div_rem(self, rhs: U256) -> (U256, U256)
pub const fn div_rem(self, rhs: U256) -> (U256, U256)
Divides by another U256, returning the quotient and remainder.
§Panics
If rhs is zero, matching the primitive integers (which panic on a
zero divisor regardless of overflow-checks).
Sourcepub const fn checked_div_rem(self, rhs: U256) -> Option<(U256, U256)>
pub const fn checked_div_rem(self, rhs: U256) -> Option<(U256, U256)>
Divides by another U256, returning None if rhs is zero.
Sourcepub const fn checked_div(self, rhs: U256) -> Option<U256>
pub const fn checked_div(self, rhs: U256) -> Option<U256>
Division, returning None if rhs is zero.
Sourcepub const fn checked_rem(self, rhs: U256) -> Option<U256>
pub const fn checked_rem(self, rhs: U256) -> Option<U256>
Remainder, returning None if rhs is zero.
Source§impl U256
impl U256
Sourcepub const fn min(self, other: U256) -> U256
pub const fn min(self, other: U256) -> U256
The smaller of two values. Math.min.
Shadows Ord::min in method position, which resolves to the same
answer; this one is a const fn.
Sourcepub const fn max(self, other: U256) -> U256
pub const fn max(self, other: U256) -> U256
The larger of two values. Math.max.
Shadows Ord::max in method position, which resolves to the same
answer; this one is a const fn.
Sourcepub const fn average(self, other: U256) -> U256
pub const fn average(self, other: U256) -> U256
The average of two values, rounded toward zero, without an
intermediate that overflows. Math.average.
(a + b) / 2 would wrap; (a & b) + (a ^ b) / 2 is the same value and
never leaves the range.
Sourcepub const fn checked_ceil_div(self, rhs: U256) -> Option<U256>
pub const fn checked_ceil_div(self, rhs: U256) -> Option<U256>
Division rounding toward positive infinity, returning None if rhs
is zero. Math.ceilDiv.
Sourcepub const fn checked_div_rounding(
self,
rhs: U256,
rounding: Rounding,
) -> Option<U256>
pub const fn checked_div_rounding( self, rhs: U256, rounding: Rounding, ) -> Option<U256>
Division following rounding, returning None if rhs is zero.
Sourcepub const fn div_rounding(self, rhs: U256, rounding: Rounding) -> U256
pub const fn div_rounding(self, rhs: U256, rounding: Rounding) -> U256
Sourcepub const fn mul_div(x: U256, y: U256, d: U256) -> U256
pub const fn mul_div(x: U256, y: U256, d: U256) -> U256
floor(x * y / d) computed on the exact 512-bit product. Math.mulDiv.
§Panics
If d is zero, or if the quotient does not fit in a U256. Both
panics are unconditional rather than overflow-checks-gated, for the
reason mul_div_u128 gives: this is an explicit
exact-arithmetic call, not an operator with primitive behaviour to
match.
Sourcepub const fn checked_mul_div_rounding(
x: U256,
y: U256,
d: U256,
rounding: Rounding,
) -> Option<U256>
pub const fn checked_mul_div_rounding( x: U256, y: U256, d: U256, rounding: Rounding, ) -> Option<U256>
x * y / d computed on the exact 512-bit product, following
rounding. Returns None if d is zero or the result exceeds
U256::MAX. Math.mulDiv with a rounding argument.
Sourcepub const fn checked_mul_shr(x: U256, y: U256, n: u32) -> Option<U256>
pub const fn checked_mul_shr(x: U256, y: U256, n: u32) -> Option<U256>
floor(x * y >> n) computed on the exact 512-bit product, returning
None if the result exceeds U256::MAX or n is at least 256.
Math.mulShr, whose n is a uint8 and so cannot reach 256 at all.
Sourcepub const fn mul_shr(x: U256, y: U256, n: u32) -> U256
pub const fn mul_shr(x: U256, y: U256, n: u32) -> U256
floor(x * y >> n) computed on the exact 512-bit product.
Math.mulShr.
§Panics
If n is at least 256, or if the result does not fit in a U256.
Sourcepub const fn checked_mul_shr_rounding(
x: U256,
y: U256,
n: u32,
rounding: Rounding,
) -> Option<U256>
pub const fn checked_mul_shr_rounding( x: U256, y: U256, n: u32, rounding: Rounding, ) -> Option<U256>
x * y >> n computed on the exact 512-bit product, following
rounding. Math.mulShr with a rounding argument.
Sourcepub const fn checked_add_mod(x: U256, y: U256, m: U256) -> Option<U256>
pub const fn checked_add_mod(x: U256, y: U256, m: U256) -> Option<U256>
(x + y) % m, computed on the exact 257-bit sum. Returns None if m
is zero.
The EVM’s addmod, which Math.sol uses but does not re-export.
Sourcepub const fn checked_mul_mod(x: U256, y: U256, m: U256) -> Option<U256>
pub const fn checked_mul_mod(x: U256, y: U256, m: U256) -> Option<U256>
(x * y) % m, computed on the exact 512-bit product. Returns None if
m is zero.
The EVM’s mulmod, which Math.sol uses but does not re-export.
Sourcepub const fn checked_mod_exp(b: U256, e: U256, m: U256) -> Option<U256>
pub const fn checked_mod_exp(b: U256, e: U256, m: U256) -> Option<U256>
b.pow(e) % m, returning None if m is zero. Math.tryModExp.
The zero-modulus refusal follows OpenZeppelin rather than the
precompile it calls: EIP-198 treats a zero modulus as defined and
answers zero, and tryModExp guards it in Solidity before the
staticcall. A port is written against the library, so this matches
the library.
Square-and-multiply over checked_mul_mod:
one full-precision multiply-divide per bit of e, plus one more per
set bit – up to 512 for a full-width exponent. See
mod_exp for what that costs and why an
attacker-chosen exponent is a gas-exhaustion surface.
Sourcepub const fn mod_exp(b: U256, e: U256, m: U256) -> U256
pub const fn mod_exp(b: U256, e: U256, m: U256) -> U256
b.pow(e) % m. Math.modExp.
§Cost
This is the most expensive function in the crate, by a wide margin, and the one place where being a library rather than a precompile really costs.
Math.modExp in Solidity is not an implementation: it is a
staticcall to the EIP-198 precompile at address 0x05, so the
bignum runs as native client code at a flat fee. Thruput’s syscall
table – the actual analogue of the EVM’s precompile slots – carries
kSHA256 and kVerifySignature (EVM 0x02 and 0x01) but nothing
for modular exponentiation, so this runs inside the contract.
That means the loop is real work: once per bit of e, with one
full-precision multiply-divide per bit and another per set bit, up to
512 of them for a full-width exponent. At the 4,712 gas the bench
measures for one mul_div, a 256-bit exponent is on the order of two
million. An entrypoint that lets a caller choose e or m is
therefore a gas-exhaustion surface: bound the exponent, or charge for
it.
If modular exponentiation ever becomes load-bearing here – RSA
verification, anything with a pairing behind it – the answer is a host
syscall alongside kSHA256, not a better loop. That is a protocol
change rather than an SDK one, and it is tracked as
https://github.com/thruputchain/thruput-sdk-rs/issues/383.
Two things this does have over the Solidity version. It is a
const fn, where Math.modExp must be view because a staticcall
is not pure. And it cannot silently answer zero: OpenZeppelin’s own
documentation warns that on a chain without the precompile the
staticcall succeeds and the result “may be incorrectly interpreted as
0”, which is not a failure mode an in-contract loop has.
§Panics
If m is zero.
Sourcepub const fn inv_mod(a: U256, n: U256) -> U256
pub const fn inv_mod(a: U256, n: U256) -> U256
The modular multiplicative inverse of a in Z/nZ, or zero when a
has no inverse (including when n is zero or one). Math.invMod.
Iterative extended Euclid. The Bézout coefficient is carried as a
magnitude with an implied alternating sign, rather than as a signed
value: consecutive coefficients always have opposite signs, so the
recurrence on magnitudes is t[k+1] = t[k-1] + q * t[k], and the
standard bound t <= n / gcd keeps every intermediate inside a
U256.
Sourcepub const fn inv_mod_prime(a: U256, p: U256) -> U256
pub const fn inv_mod_prime(a: U256, p: U256) -> U256
The modular multiplicative inverse of a in Z/pZ for a prime p
greater than two. Math.invModPrime.
Fermat’s little theorem: a^(p-2) = a^-1 (mod p). p is not checked
for primality; a composite modulus produces a wrong answer rather
than an error, exactly as in Solidity. Use
inv_mod when the modulus is not known to be prime.
§Cost
This is mod_exp with a full-width exponent, so it is
as expensive as that function’s worst case. It reads like a cheap
helper and is not one.
§Panics
If p is zero. Note that this differs from inv_mod,
which is total and answers zero for a degenerate modulus: swapping one
for the other after establishing primality elsewhere turns that zero
into an abort.
Sourcepub const fn overflowing_pow(self, exp: u32) -> (U256, bool)
pub const fn overflowing_pow(self, exp: u32) -> (U256, bool)
Exponentiation, with a flag reporting whether it wrapped.
0.pow(0) is one, matching the primitives.
Sourcepub const fn checked_pow(self, exp: u32) -> Option<U256>
pub const fn checked_pow(self, exp: u32) -> Option<U256>
Exponentiation, returning None on overflow.
Sourcepub const fn wrapping_pow(self, exp: u32) -> U256
pub const fn wrapping_pow(self, exp: u32) -> U256
Exponentiation, wrapping on overflow.
Sourcepub const fn saturating_pow(self, exp: u32) -> U256
pub const fn saturating_pow(self, exp: u32) -> U256
Exponentiation, saturating at U256::MAX.
Sourcepub const fn pow(self, exp: u32) -> U256
pub const fn pow(self, exp: u32) -> U256
Exponentiation.
§Panics
On overflow, if overflow-checks is on – otherwise it wraps, like the
operators and like the primitives’ pow.
Sourcepub const fn sqrt_rounding(self, rounding: Rounding) -> U256
pub const fn sqrt_rounding(self, rounding: Rounding) -> U256
The integer square root, following rounding. Math.sqrt with a
rounding argument.
Sourcepub const fn log2_rounding(self, rounding: Rounding) -> u32
pub const fn log2_rounding(self, rounding: Rounding) -> u32
log2(self) following rounding, or zero for zero. Math.log2 with a
rounding argument.
Sourcepub const fn log10(self) -> u32
pub const fn log10(self) -> u32
floor(log10(self)), or zero for zero. Math.log10.
Peels eight digits at a time with div_rem_small
– 10^8 is the largest power of ten that is both a u32 and a whole
number of digits – so this never links Knuth D, unlike the ladder of
256-bit constants Solidity uses.
Sourcepub const fn log10_rounding(self, rounding: Rounding) -> u32
pub const fn log10_rounding(self, rounding: Rounding) -> u32
log10(self) following rounding, or zero for zero. Math.log10 with
a rounding argument.
Sourcepub const fn log256(self) -> u32
pub const fn log256(self) -> u32
floor(log256(self)), or zero for zero. Math.log256.
One more than this is the number of bytes needed to write self.
Sourcepub const fn log256_rounding(self, rounding: Rounding) -> u32
pub const fn log256_rounding(self, rounding: Rounding) -> u32
log256(self) following rounding, or zero for zero. Math.log256
with a rounding argument.
Source§impl U256
impl U256
Sourcepub const fn cast_signed(self) -> I256
pub const fn cast_signed(self) -> I256
Reinterprets the bits as an I256.
No arithmetic: U256::MAX.cast_signed() is -1. Named after
u128::cast_signed, which does the same thing at a narrower width.
Source§impl U256
impl U256
Sourcepub const fn integer_sqrt(self) -> U256
pub const fn integer_sqrt(self) -> U256
The largest r such that r * r <= self.
Digit-by-digit (binary restoring): shifts, comparisons and subtractions,
no division. Newton’s method costs a full 256-bit divide per iteration
that LLVM inlines into the loop – uint’s Newton-based version
measured 12,732 bytes of rv32 text, for a square root.
Source§impl U256
impl U256
Sourcepub const fn from_limbs(limbs: [u32; 8]) -> U256
pub const fn from_limbs(limbs: [u32; 8]) -> U256
Constructs a value from limbs, least-significant-first.
Sourcepub const fn from(n: u128) -> U256
pub const fn from(n: u128) -> U256
Constructs a value from a u128.
Inherent, and deliberately so. From is implemented for every unsigned
width, which leaves U256::from(1000) ambiguous – an unsuffixed
literal matches all of them – and an inherent function shadows the
trait for the path form, pinning the literal to u128. It is also
usable in const position, which From::from is not.
The trait impls are untouched, so .into() and generic T: Into<U256>
code still convert from any width. What this shadowing costs is
U256::from(x) for an x narrower than u128; use x.into() or
from_u32 / from_u64 there.
Sourcepub const fn from_u128(n: u128) -> U256
pub const fn from_u128(n: u128) -> U256
Constructs a value from a u128, under a name no trait shadows.
from is this function behind the literal-pinning
shadow, and the From<u128> impl calls it too, so neither body
depends on the shadowing to terminate.
Sourcepub const fn from_u32(n: u32) -> U256
pub const fn from_u32(n: u32) -> U256
Constructs a value from a u32, without widening at the call site.
Sourcepub const fn from_u64(n: u64) -> U256
pub const fn from_u64(n: u64) -> U256
Constructs a value from a u64, without widening at the call site.
Sourcepub const fn bit_len(self) -> u32
pub const fn bit_len(self) -> u32
The number of significant bits: 0 for zero, otherwise one more than
the index of the highest set bit.
Sourcepub const fn leading_zeros(self) -> u32
pub const fn leading_zeros(self) -> u32
The number of leading zero bits.
Sourcepub const fn bit(self, i: u32) -> bool
pub const fn bit(self, i: u32) -> bool
Returns the bit at i, counting from the least significant.
Bits at or above BITS are zero, rather than a panic:
callers index by a computed position (an exponent bit, a mask width),
and the out-of-range answer is unambiguous.
Sourcepub const fn const_cmp(self, other: U256) -> Ordering
pub const fn const_cmp(self, other: U256) -> Ordering
Comparison usable from a const fn.
The Ord impl is the one callers want; it just is not const, and
the arithmetic in this crate is. Same ordering, same answer.
Sourcepub const fn to_be_bytes(self) -> [u8; 32]
pub const fn to_be_bytes(self) -> [u8; 32]
Returns the big-endian byte representation.
Outlined on rv32 – every contract that stores a U256 pays for this
one. See the inlining note in arith.
Sourcepub const fn from_be_bytes(bytes: [u8; 32]) -> U256
pub const fn from_be_bytes(bytes: [u8; 32]) -> U256
Constructs a value from its big-endian byte representation.
Outlined on rv32; see the inlining note in arith.
Trait Implementations§
Source§impl AddAssign for U256
impl AddAssign for U256
Source§fn add_assign(&mut self, rhs: U256)
fn add_assign(&mut self, rhs: U256)
+= operation. Read moreSource§impl BitAndAssign for U256
impl BitAndAssign for U256
Source§fn bitand_assign(&mut self, rhs: U256)
fn bitand_assign(&mut self, rhs: U256)
&= operation. Read moreSource§impl BitOrAssign for U256
impl BitOrAssign for U256
Source§fn bitor_assign(&mut self, rhs: U256)
fn bitor_assign(&mut self, rhs: U256)
|= operation. Read moreSource§impl BitXorAssign for U256
impl BitXorAssign for U256
Source§fn bitxor_assign(&mut self, rhs: U256)
fn bitxor_assign(&mut self, rhs: U256)
^= operation. Read moreSource§impl CollectAuthHandles for U256
impl CollectAuthHandles for U256
fn collect_auth_handles( &self, _out: &mut AuthHandleBuf, ) -> Result<(), FaultString>
Source§impl ContractTypeRefSpec for U256
impl ContractTypeRefSpec for U256
Source§const INFO: ContractTypeInfo<'static>
const INFO: ContractTypeInfo<'static>
__THRUPUT_SPEC_ANCHOR_ROOT) and resolved by spec-tool.Source§const SIGNED_PREIMAGE: Option<&'static ContractTypeView<'static>> = _
const SIGNED_PREIMAGE: Option<&'static ContractTypeView<'static>> = _
ContractTypeView::SignedToken’s payload): the type itself by
default, or None for a type-erased payload (the SDK’s Opaque
overrides this).impl Copy for U256
Source§impl Debug for U256
impl Debug for U256
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>
Renders as 0x-prefixed hex.
Unlike the LowerHex/UpperHex impls this does not honour width or
fill flags – Debug is for diagnostics, and a padded {:?} on an
integer is not a thing callers ask for. Use {:x} when the exact
textual shape matters.
Source§impl DivAssign for U256
impl DivAssign for U256
Source§fn div_assign(&mut self, rhs: U256)
fn div_assign(&mut self, rhs: U256)
/= operation. Read moreimpl Eq for U256
Source§impl Mintable for U256
impl Mintable for U256
fn mint_into_parent(preimage: U256, _children: &mut ChildNodeBuf) -> Self
Source§impl MulAssign for U256
impl MulAssign for U256
Source§fn mul_assign(&mut self, rhs: U256)
fn mul_assign(&mut self, rhs: U256)
*= operation. Read moreSource§impl MulAssign<u32> for U256
impl MulAssign<u32> for U256
Source§fn mul_assign(&mut self, rhs: u32)
fn mul_assign(&mut self, rhs: u32)
*= operation. Read moreSource§impl Ord for U256
impl Ord for U256
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for U256
impl PartialOrd for U256
Source§impl<'r> ReadXDR<'r> for U256
impl<'r> ReadXDR<'r> for U256
Source§impl ReceiveAuthHandles for U256
impl ReceiveAuthHandles for U256
fn receive_auth_handles( &mut self, _handles: &mut impl Iterator<Item = u32>, ) -> Result<(), AuthTokenError>
Source§impl RemAssign for U256
impl RemAssign for U256
Source§fn rem_assign(&mut self, rhs: U256)
fn rem_assign(&mut self, rhs: U256)
%= operation. Read moreSource§impl ShlAssign<i8> for U256
impl ShlAssign<i8> for U256
Source§fn shl_assign(&mut self, rhs: i8)
fn shl_assign(&mut self, rhs: i8)
<<= operation. Read moreSource§impl ShlAssign<i16> for U256
impl ShlAssign<i16> for U256
Source§fn shl_assign(&mut self, rhs: i16)
fn shl_assign(&mut self, rhs: i16)
<<= operation. Read moreSource§impl ShlAssign<i32> for U256
impl ShlAssign<i32> for U256
Source§fn shl_assign(&mut self, rhs: i32)
fn shl_assign(&mut self, rhs: i32)
<<= operation. Read moreSource§impl ShlAssign<i64> for U256
impl ShlAssign<i64> for U256
Source§fn shl_assign(&mut self, rhs: i64)
fn shl_assign(&mut self, rhs: i64)
<<= operation. Read moreSource§impl ShlAssign<i128> for U256
impl ShlAssign<i128> for U256
Source§fn shl_assign(&mut self, rhs: i128)
fn shl_assign(&mut self, rhs: i128)
<<= operation. Read moreSource§impl ShlAssign<isize> for U256
impl ShlAssign<isize> for U256
Source§fn shl_assign(&mut self, rhs: isize)
fn shl_assign(&mut self, rhs: isize)
<<= operation. Read moreSource§impl ShlAssign<u8> for U256
impl ShlAssign<u8> for U256
Source§fn shl_assign(&mut self, rhs: u8)
fn shl_assign(&mut self, rhs: u8)
<<= operation. Read moreSource§impl ShlAssign<u16> for U256
impl ShlAssign<u16> for U256
Source§fn shl_assign(&mut self, rhs: u16)
fn shl_assign(&mut self, rhs: u16)
<<= operation. Read moreSource§impl ShlAssign<u32> for U256
impl ShlAssign<u32> for U256
Source§fn shl_assign(&mut self, rhs: u32)
fn shl_assign(&mut self, rhs: u32)
<<= operation. Read moreSource§impl ShlAssign<u64> for U256
impl ShlAssign<u64> for U256
Source§fn shl_assign(&mut self, rhs: u64)
fn shl_assign(&mut self, rhs: u64)
<<= operation. Read moreSource§impl ShlAssign<u128> for U256
impl ShlAssign<u128> for U256
Source§fn shl_assign(&mut self, rhs: u128)
fn shl_assign(&mut self, rhs: u128)
<<= operation. Read moreSource§impl ShlAssign<usize> for U256
impl ShlAssign<usize> for U256
Source§fn shl_assign(&mut self, rhs: usize)
fn shl_assign(&mut self, rhs: usize)
<<= operation. Read moreSource§impl ShrAssign<i8> for U256
impl ShrAssign<i8> for U256
Source§fn shr_assign(&mut self, rhs: i8)
fn shr_assign(&mut self, rhs: i8)
>>= operation. Read moreSource§impl ShrAssign<i16> for U256
impl ShrAssign<i16> for U256
Source§fn shr_assign(&mut self, rhs: i16)
fn shr_assign(&mut self, rhs: i16)
>>= operation. Read moreSource§impl ShrAssign<i32> for U256
impl ShrAssign<i32> for U256
Source§fn shr_assign(&mut self, rhs: i32)
fn shr_assign(&mut self, rhs: i32)
>>= operation. Read moreSource§impl ShrAssign<i64> for U256
impl ShrAssign<i64> for U256
Source§fn shr_assign(&mut self, rhs: i64)
fn shr_assign(&mut self, rhs: i64)
>>= operation. Read moreSource§impl ShrAssign<i128> for U256
impl ShrAssign<i128> for U256
Source§fn shr_assign(&mut self, rhs: i128)
fn shr_assign(&mut self, rhs: i128)
>>= operation. Read moreSource§impl ShrAssign<isize> for U256
impl ShrAssign<isize> for U256
Source§fn shr_assign(&mut self, rhs: isize)
fn shr_assign(&mut self, rhs: isize)
>>= operation. Read moreSource§impl ShrAssign<u8> for U256
impl ShrAssign<u8> for U256
Source§fn shr_assign(&mut self, rhs: u8)
fn shr_assign(&mut self, rhs: u8)
>>= operation. Read moreSource§impl ShrAssign<u16> for U256
impl ShrAssign<u16> for U256
Source§fn shr_assign(&mut self, rhs: u16)
fn shr_assign(&mut self, rhs: u16)
>>= operation. Read moreSource§impl ShrAssign<u32> for U256
impl ShrAssign<u32> for U256
Source§fn shr_assign(&mut self, rhs: u32)
fn shr_assign(&mut self, rhs: u32)
>>= operation. Read moreSource§impl ShrAssign<u64> for U256
impl ShrAssign<u64> for U256
Source§fn shr_assign(&mut self, rhs: u64)
fn shr_assign(&mut self, rhs: u64)
>>= operation. Read moreSource§impl ShrAssign<u128> for U256
impl ShrAssign<u128> for U256
Source§fn shr_assign(&mut self, rhs: u128)
fn shr_assign(&mut self, rhs: u128)
>>= operation. Read moreSource§impl ShrAssign<usize> for U256
impl ShrAssign<usize> for U256
Source§fn shr_assign(&mut self, rhs: usize)
fn shr_assign(&mut self, rhs: usize)
>>= operation. Read moreimpl StructuralPartialEq for U256
Source§impl SubAssign for U256
impl SubAssign for U256
Source§fn sub_assign(&mut self, rhs: U256)
fn sub_assign(&mut self, rhs: U256)
-= operation. Read more