Struct ethers::core::k256::elliptic_curve::bigint::UInt [−][src]
pub struct UInt<const LIMBS: usize> { /* fields omitted */ }
Expand description
Big unsigned integer.
Generic over the given number of LIMBS
Encoding support
This type supports many different types of encodings, either via the
Encoding
trait or various const fn
decoding and
encoding functions that can be used with UInt
constants.
Optional crate features for encoding (off-by-default):
generic-array
: enablesArrayEncoding
trait which can be used toUInt
asGenericArray<u8, N>
and aArrayDecoding
trait which can be used toGenericArray<u8, N>
asUInt
.rlp
: support for Recursive Length Prefix (RLP) encoding.
Implementations
Computes a + b + carry
, returning the result along with the new carry.
Perform wrapping addition, discarding overflow.
Perform wrapping bitwise and. There’s no way wrapping could ever happen. This function exists so that all operations are accounted for in the wrapping operations
Computes self / rhs, returns the quotient, remainder if rhs != 0
Computes self % rhs, returns the remainder if rhs != 0
Wrapped division is just normal division i.e. self
/ rhs
There’s no way wrapping could ever happen.
This function exists, so that all operations are accounted for in the wrapping operations.
Perform checked division, returning a CtOption
which is_some
only if the rhs != 0
Wrapped (modular) remainder calculation is just self
% rhs
.
There’s no way wrapping could ever happen.
This function exists, so that all operations are accounted for in the wrapping operations.
Create a UInt
from an array of the limb::Inner
unsigned integer type.
Create an array of limb::Inner
unsigned integer type from a UInt
.
Compute “wide” multiplication, with a product twice the size of the input.
Perform wrapping multiplication, discarding overflow.
Perform checked multiplication, returning a CtOption
which is_some
only if the operation did not overflow.
Perform wrapping bitwise or. There’s no way wrapping could ever happen. This function exists so that all operations are accounted for in the wrapping operations
Computes self << shift
.
NOTE: this operation is variable time with respect to n
ONLY.
When used with a fixed n
, this function is constant-time with respect
to self
.
Computes self >> n
.
NOTE: this operation is variable time with respect to n
ONLY.
When used with a fixed n
, this function is constant-time with respect
to self
.
Computes √(self
)
Uses Brent & Zimmermann, Modern Computer Arithmetic, v0.5.9, Algorithm 1.13
Callers can check if self
is a square by squaring the result
Wrapped sqrt is just normal √(self
)
There’s no way wrapping could ever happen.
This function exists, so that all operations are accounted for in the wrapping operations.
Perform checked sqrt, returning a CtOption
which is_some
only if the √(self
)² == self
Computes a - (b + borrow)
, returning the result along with the new borrow.
Perform wrapping subtraction, discarding underflow and wrapping around the boundary of the type.
Generate a cryptographically secure random UInt
.
Generate a cryptographically secure random UInt
which is less than
a given modulus
.
This function uses rejection sampling, a method which produces an
unbiased distribution of in-range values provided the underlying
CryptoRng
is unbiased, but runs in variable-time.
The variable-time nature of the algorithm should not pose a security
issue so long as the underlying random number generator is truly a
CryptoRng
, where previous outputs are unrelated to subsequent
outputs and do not reveal information about the RNG’s internal state.
Trait Implementations
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Size of a byte array which encodes a big integer.
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_be_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a big-endian byte array.
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
pub fn from_le_byte_array(
bytes: GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
) -> UInt<{_: usize}>
Deserialize from a little-endian byte array.
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_be_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a big-endian byte array.
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
pub fn to_le_byte_array(
&self
) -> GenericArray<u8, <UInt<{_: usize}> as ArrayEncoding>::ByteSize>
Serialize to a little-endian byte array.
Performs the /=
operation. Read more
Performs the /=
operation. Read more
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
Decode from big endian bytes.
Decode from little endian bytes.
Encode to big endian bytes.
Encode to little endian bytes.
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Performs the %=
operation. Read more
Performs the %=
operation. Read more
NOTE: this operation is variable time with respect to rhs
ONLY.
When used with a fixed rhs
, this function is constant-time with respect
to self
.
Performs the >>=
operation. Read more
Auto Trait Implementations
impl<const LIMBS: usize> RefUnwindSafe for UInt<LIMBS>
impl<const LIMBS: usize> UnwindSafe for UInt<LIMBS>
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more