Struct etcommon_bigint::U128 [] [src]

#[repr(C)]
pub struct U128(pub [u64; 2]);

Little-endian large integer type

Methods

impl U128
[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. This is in the 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 Encodable for U128
[src]

Append a value to the stream

Get rlp-encoded bytes for this instance

impl Decodable for U128
[src]

Decode a value from RLP bytes

impl Copy for U128
[src]

impl Clone for U128
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for U128
[src]

impl PartialEq for U128
[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 U128
[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 U128
[src]

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

impl From<u64> for U128
[src]

Performs the conversion.

impl From<u8> for U128
[src]

Performs the conversion.

impl From<u16> for U128
[src]

Performs the conversion.

impl From<u32> for U128
[src]

Performs the conversion.

impl From<usize> for U128
[src]

Performs the conversion.

impl From<i64> for U128
[src]

Performs the conversion.

impl From<i8> for U128
[src]

Performs the conversion.

impl From<i16> for U128
[src]

Performs the conversion.

impl From<i32> for U128
[src]

Performs the conversion.

impl From<isize> for U128
[src]

Performs the conversion.

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

Performs the conversion.

impl FromStr for U128
[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<U128> for U128
[src]

The resulting type after applying the + operator

The method for the + operator

impl Sub<U128> for U128
[src]

The resulting type after applying the - operator

The method for the - operator

impl Mul<U128> for U128
[src]

The resulting type after applying the * operator

The method for the * operator

impl Div<U128> for U128
[src]

The resulting type after applying the / operator

The method for the / operator

impl Rem<U128> for U128
[src]

The resulting type after applying the % operator

The method for the % operator

impl BitAnd<U128> for U128
[src]

The resulting type after applying the & operator

The method for the & operator

impl BitXor<U128> for U128
[src]

The resulting type after applying the ^ operator

The method for the ^ operator

impl BitOr<U128> for U128
[src]

The resulting type after applying the | operator

The method for the | operator

impl Not for U128
[src]

The resulting type after applying the ! operator

The method for the unary ! operator

impl Shl<usize> for U128
[src]

The resulting type after applying the << operator

The method for the << operator

impl Shr<usize> for U128
[src]

The resulting type after applying the >> operator

The method for the >> operator

impl Ord for U128
[src]

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

impl PartialOrd for U128
[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 U128
[src]

Formats the value using the given formatter.

impl Display for U128
[src]

Formats the value using the given formatter. Read more

impl LowerHex for U128
[src]

Formats the value using the given formatter.

impl UpperHex for U128
[src]

Formats the value using the given formatter.

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

Performs the conversion.

impl From<U256> for U128
[src]

Performs the conversion.

impl From<U512> for U128
[src]

Performs the conversion.

impl HeapSizeOf for U128

Measure the size of any heap-allocated structures that hang off this value, but not the space taken up by the value itself (i.e. what size_of:: measures, more or less); that space is handled by the implementation of HeapSizeOf for Box below. Read more