#[repr(C)]
pub struct U128(pub [u64; 2]);
Expand description
Little-endian large integer type
128-bit unsigned integer.
Converts a string slice in a given base to an integer. Only supports radixes of 10
and 16.
Convert from a decimal string.
Conversion to u32 with overflow checking
Panics if the number is larger than 2^32.
Conversion to u64 with overflow checking
Panics if the number is larger than u64::max_value().
Conversion to usize with overflow checking
Panics if the number is larger than usize::max_value().
Return the least number of bits needed to represent the number
Return if specific bit is set.
Panics if index
exceeds the bit width of the number.
Returns the number of leading zeros in the binary representation of self.
Returns the number of trailing zeros in the binary representation of self.
Return specific byte.
Panics if index
exceeds the byte width of the number.
Write to the slice in big-endian format.
Write to the slice in little-endian format.
Create 10**n
as this type.
Panics if the result overflows the type.
Zero (additive identity) of this type.
One (multiplicative identity) of this type.
The maximum value which can be inhabited by this type.
Returns a pair (self / other, self % other)
.
Panics if other
is zero.
Compute the highest n
such that n * n <= self
.
Fast exponentiation by squaring
https://en.wikipedia.org/wiki/Exponentiation_by_squaring
Panics if the result overflows the type.
Fast exponentiation by squaring. Returns result and overflow flag.
Checked exponentiation. Returns None
if overflow occurred.
Addition which saturates at the maximum value (Self::max_value()).
Checked addition. Returns None
if overflow occurred.
Subtraction which underflows and returns a flag if it does.
Subtraction which saturates at zero.
Checked subtraction. Returns None
if overflow occurred.
Multiply with overflow, returning a flag if it does.
Multiplication which saturates at the maximum value..
Checked multiplication. Returns None
if overflow occurred.
Checked division. Returns None
if other == 0
.
Checked modulus. Returns None
if other == 0
.
Checked negation. Returns None
unless self == 0
.
Converts from big endian representation bytes in memory.
Converts from little endian representation bytes in memory.
Conversion to u128 with overflow checking
Panics if the number is larger than 2^128.
Multiplies two 128-bit integers to produce full 256-bit integer.
Overflow is not possible.
The resulting type after applying the +
operator.
The resulting type after applying the +
operator.
Get a reference to the underlying little-endian words.
The resulting type after applying the &
operator.
The resulting type after applying the |
operator.
The resulting type after applying the ^
operator.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Attempt to deserialise the value from input.
Attempt to skip the encoded value from input. Read more
Returns the fixed encoded size of the type. Read more
Returns the “default value” for a type. Read more
Deserialize this value from the given Serde deserializer. Read more
Formats the value using the given formatter. Read more
The resulting type after applying the /
operator.
The resulting type after applying the /
operator.
Convert self to a slice and then invoke the given closure with it.
If possible give a hint of expected size of the encoding. Read more
Convert self to a slice and append it to the destination.
Convert self to an owned vector.
The associated error which can be returned from parsing.
Parses a string s
to return a value of this type. Read more
Formats the value using the given formatter.
Upper bound, in bytes, of the maximum encoded size of this item.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the *
operator.
The resulting type after applying the !
operator.
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
The resulting type after applying the %
operator.
The resulting type after applying the %
operator.
Serialize this value into the given Serde serializer. Read more
The resulting type after applying the <<
operator.
The resulting type after applying the <<
operator.
The resulting type after applying the >>
operator.
The resulting type after applying the >>
operator.
The resulting type after applying the -
operator.
The resulting type after applying the -
operator.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
The type identifying for which type info is provided. Read more
Returns the static type identifier for Self
.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Decode Self
and consume all of the given input data. Read more
Decode Self
and consume all of the given input data. Read more
Decode Self
and advance input
by the number of bytes consumed. Read more
Decode Self
with the given maximum recursion depth. Read more
impl<T, U> Into<U> for T where
U: From<T>,
Return an encoding of Self
prepended by given slice.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String
. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.