Struct bigint::U512 [] [src]

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

Little-endian large integer type

Methods

impl U512
[src]

[src]

Convert from a decimal string.

[src]

Conversion to u32

[src]

Conversion to u64

[src]

Conversion to u32 with overflow checking

Panics

Panics if the number is larger than 232.

[src]

Conversion to u64 with overflow checking

Panics

Panics if the number is larger than 264.

[src]

Conversion to usize with overflow checking

Panics

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

[src]

Whether this is zero.

[src]

Return the least number of bits needed to represent the number

[src]

Return if specific bit is set.

Panics

Panics if index exceeds the bit width of the number.

[src]

Return specific byte.

Panics

Panics if index exceeds the byte width of the number.

[src]

Return specific byte in big-endian format.

Panics

Panics if index exceeds the byte width of the number.

[src]

Write to the slice in big-endian format.

[src]

Write to the slice in little-endian format.

[src]

Create 10**n as this type.

Panics

Panics if the result overflows the type.

[src]

Zero (additive identity) of this type.

[src]

One (multiplicative identity) of this type.

[src]

The maximum value which can be inhabited by this type.

[src]

The minimum value which can be inhabited by this type.

[src]

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

Panics

Panics if the result overflows the type.

[src]

[src]

Optimized instructions

[src]

Addition which saturates at the maximum value.

[src]

Subtraction which underflows and returns a flag if it does.

[src]

Subtraction which saturates at zero.

[src]

Multiply with overflow, returning a flag if it does.

[src]

Multiplication which saturates at the maximum value..

[src]

Division with overflow

[src]

Modulus with overflow.

[src]

Negation with overflow.

Trait Implementations

impl Copy for U512
[src]

impl Clone for U512
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for U512
[src]

impl PartialEq for U512
[src]

[src]

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

[src]

This method tests for !=.

impl Hash for U512
[src]

[src]

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

1.3.0
[src]

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

impl Default for U512
[src]

[src]

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

impl From<u64> for U512
[src]

[src]

Performs the conversion.

impl From<u8> for U512
[src]

[src]

Performs the conversion.

impl From<u16> for U512
[src]

[src]

Performs the conversion.

impl From<u32> for U512
[src]

[src]

Performs the conversion.

impl From<usize> for U512
[src]

[src]

Performs the conversion.

impl From<i64> for U512
[src]

[src]

Performs the conversion.

impl From<i8> for U512
[src]

[src]

Performs the conversion.

impl From<i16> for U512
[src]

[src]

Performs the conversion.

impl From<i32> for U512
[src]

[src]

Performs the conversion.

impl From<isize> for U512
[src]

[src]

Performs the conversion.

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

[src]

Performs the conversion.

impl FromStr for U512
[src]

The associated error which can be returned from parsing.

[src]

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.

[src]

Performs the + operation.

impl Sub<U512> for U512
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl Mul<U512> for U512
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl Div<U512> for U512
[src]

The resulting type after applying the / operator.

[src]

Performs the / operation.

impl Rem<U512> for U512
[src]

The resulting type after applying the % operator.

[src]

Performs the % operation.

impl BitAnd<U512> for U512
[src]

The resulting type after applying the & operator.

[src]

Performs the & operation.

impl BitXor<U512> for U512
[src]

The resulting type after applying the ^ operator.

[src]

Performs the ^ operation.

impl BitOr<U512> for U512
[src]

The resulting type after applying the | operator.

[src]

Performs the | operation.

impl Not for U512
[src]

The resulting type after applying the ! operator.

[src]

Performs the unary ! operation.

impl Shl<usize> for U512
[src]

The resulting type after applying the << operator.

[src]

Performs the << operation.

impl Shr<usize> for U512
[src]

The resulting type after applying the >> operator.

[src]

Performs the >> operation.

impl Ord for U512
[src]

[src]

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

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl PartialOrd for U512
[src]

[src]

This method returns an ordering between self and other values if one exists. Read more

1.0.0
[src]

This method tests less than (for self and other) and is used by the < operator. Read more

1.0.0
[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

1.0.0
[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

1.0.0
[src]

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]

[src]

Formats the value using the given formatter.

impl Display for U512
[src]

[src]

Formats the value using the given formatter. Read more

impl LowerHex for U512
[src]

[src]

Formats the value using the given formatter.

impl UpperHex for U512
[src]

[src]

Formats the value using the given formatter.

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

[src]

Performs the conversion.

impl From<U256> for U512
[src]

[src]

Performs the conversion.

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

[src]

Performs the conversion.

impl From<U128> for U512
[src]

[src]

Performs the conversion.