#[repr(C)]
pub struct U512(pub [u64; 8]);
Expand description

Little-endian large integer type 512-bits unsigned integer.

Tuple Fields

0: [u64; 8]

Implementations

Low 2 words (u128)

Conversion to u128 with overflow checking

Panics

Panics if the number is larger than 2^128.

Maximum value.

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

Low word (u64)

Conversion to u32 with overflow checking

Panics

Panics if the number is larger than 2^32.

Conversion to u64 with overflow checking

Panics

Panics if the number is larger than u64::max_value().

Conversion to usize with overflow checking

Panics

Panics if the number is larger than usize::max_value().

Whether this is zero.

Return the least number of bits needed to represent the number

Return if specific bit is set.

Panics

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

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

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

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

Panics if the result overflows the type.

Fast exponentiation by squaring. Returns result and overflow flag.

Checked exponentiation. Returns None if overflow occurred.

Add with overflow.

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.

Negation with overflow.

Checked negation. Returns None unless self == 0.

Converts from big endian representation bytes in memory.

Converts from little endian representation bytes in memory.

Trait Implementations

The resulting type after applying the + operator.

Performs the + operation. Read more

The resulting type after applying the + operator.

Performs the + operation. Read more

Performs the += operation. Read more

Get a reference to the underlying little-endian words.

Performs the conversion.

The resulting type after applying the & operator.

Performs the & operation. Read more

The resulting type after applying the | operator.

Performs the | operation. Read more

The resulting type after applying the ^ operator.

Performs the ^ operation. Read more

Returns a copy of the value. Read more

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.

Performs the / operation. Read more

The resulting type after applying the / operator.

Performs the / operation. Read more

Performs the /= operation. Read more

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.

Calculates the encoded size. Read more

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

The associated error which can be returned from parsing.

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

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. 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.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

The resulting type after applying the * operator.

Performs the * operation. Read more

Performs the *= operation. Read more

Performs the *= operation. Read more

Performs the *= operation. Read more

Performs the *= operation. Read more

Performs the *= operation. Read more

Performs the *= operation. Read more

Performs the *= operation. Read more

Performs the *= operation. Read more

Performs the *= operation. Read more

Performs the *= operation. Read more

Performs the *= operation. Read more

The resulting type after applying the ! operator.

Performs the unary ! operation. Read more

This method returns an Ordering between self and other. Read more

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.

Performs the % operation. Read more

The resulting type after applying the % operator.

Performs the % operation. Read more

Performs the %= operation. Read more

Serialize this value into the given Serde serializer. Read more

The resulting type after applying the << operator.

Performs the << operation. Read more

The resulting type after applying the << operator.

Performs the << operation. Read more

Performs the <<= operation. Read more

The resulting type after applying the >> operator.

Performs the >> operation. Read more

The resulting type after applying the >> operator.

Performs the >> operation. Read more

Performs the >>= operation. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

The resulting type after applying the - operator.

Performs the - operation. Read more

Performs the -= operation. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type identifying for which type info is provided. Read more

Returns the static type identifier for Self.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

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

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Get a reference to the inner from the outer.

Get a mutable reference to the inner from the outer.

Return an encoding of Self prepended by given slice.

Should always be Self

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.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The counterpart to unchecked_from.

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