Struct bigint::U512 [] [src]

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

Little-endian large integer type

Methods

impl U512
[src]

Convert from a decimal string.

Conversion to u32

Conversion to u64

Conversion to u32 with overflow checking

Panics

Panics if the number is larger than 232.

Conversion to u64 with overflow checking

Panics

Panics if the number is larger than 264.

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.

Return specific byte.

Panics

Panics if index exceeds the byte width of the number.

Return specific byte in big-endian format.

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.

The minimum value which can be inhabited by this type.

Fast exponentation by squaring https://en.wikipedia.org/wiki/Exponentiation_by_squaring

Panics

Panics if the result overflows the type.

Optimized instructions

Addition which saturates at the maximum value.

Subtraction which underflows and returns a flag if it does.

Subtraction which saturates at zero.

Multiply with overflow, returning a flag if it does.

Multiplication which saturates at the maximum value..

Division with overflow

Modulus with overflow.

Negation with overflow.

Trait Implementations

impl Copy for U512
[src]

impl Clone for U512
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for U512
[src]

impl PartialEq for U512
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Hash for U512
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Default for U512
[src]

Returns the "default value" for a type. Read more

impl From<u64> for U512
[src]

Performs the conversion.

impl From<u8> for U512
[src]

Performs the conversion.

impl From<u16> for U512
[src]

Performs the conversion.

impl From<u32> for U512
[src]

Performs the conversion.

impl From<usize> for U512
[src]

Performs the conversion.

impl From<i64> for U512
[src]

Performs the conversion.

impl From<i8> for U512
[src]

Performs the conversion.

impl From<i16> for U512
[src]

Performs the conversion.

impl From<i32> for U512
[src]

Performs the conversion.

impl From<isize> for U512
[src]

Performs the conversion.

impl<'a> From<&'a [u8]> for U512
[src]

Performs the conversion.

impl FromStr for U512
[src]

The associated error which can be returned from parsing.

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

impl Add<U512> for U512
[src]

The resulting type after applying the + operator

The method for the + operator

impl Sub<U512> for U512
[src]

The resulting type after applying the - operator

The method for the - operator

impl Mul<U512> for U512
[src]

The resulting type after applying the * operator

The method for the * operator

impl Div<U512> for U512
[src]

The resulting type after applying the / operator

The method for the / operator

impl Rem<U512> for U512
[src]

The resulting type after applying the % operator

The method for the % operator

impl BitAnd<U512> for U512
[src]

The resulting type after applying the & operator

The method for the & operator

impl BitXor<U512> for U512
[src]

The resulting type after applying the ^ operator

The method for the ^ operator

impl BitOr<U512> for U512
[src]

The resulting type after applying the | operator

The method for the | operator

impl Not for U512
[src]

The resulting type after applying the ! operator

The method for the unary ! operator

impl Shl<usize> for U512
[src]

The resulting type after applying the << operator

The method for the << operator

impl Shr<usize> for U512
[src]

The resulting type after applying the >> operator

The method for the >> operator

impl Ord for U512
[src]

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

🔬 This is a nightly-only experimental API. (ord_max_min)

Compares and returns the maximum of two values. Read more

🔬 This is a nightly-only experimental API. (ord_max_min)

Compares and returns the minimum of two values. Read more

impl PartialOrd for U512
[src]

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

impl Debug for U512
[src]

Formats the value using the given formatter.

impl Display for U512
[src]

Formats the value using the given formatter. Read more

impl LowerHex for U512
[src]

Formats the value using the given formatter.

impl UpperHex for U512
[src]

Formats the value using the given formatter.

impl From<&'static str> for U512
[src]

Performs the conversion.

impl From<U256> for U512
[src]

Performs the conversion.

impl<'a> From<&'a U256> for U512
[src]

Performs the conversion.

impl From<U128> for U512
[src]

Performs the conversion.