[]Struct chain::bigint::uint::U256

#[repr(C)]
pub struct U256(pub [u64; 4]);
[]

Little-endian large integer type

Methods

impl U256
[]

[]

Multiplies two 256-bit integers to produce full 512-bit integer No overflow possible

Trait Implementations

impl From<Compact> for U256
[src]
[+]

[]

Performs the conversion.

impl From<U256> for Compact
[src]
[+]

[]

Performs the conversion.

impl Ord for U256
[+]

[]

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

impl Eq for U256

impl PartialEq<U256> for U256
[+]

[]

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

[]

This method tests for !=.

impl Mul<U256> for U256
[+]

The resulting type after applying the * operator.

[]

Performs the * operation.

impl Debug for U256
[+]

[]

Formats the value using the given formatter. Read more

impl FromStr for U256
[+]

The associated error which can be returned from parsing.

[]

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

impl BitXor<U256> for U256
[+]

The resulting type after applying the ^ operator.

[]

Performs the ^ operation.

impl Hash for U256
[+]

[]

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

[]

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

impl Uint for U256
[+]

[]

Convert from a decimal string.

[]

Conversion to u32

[]

Conversion to u64

[]

Conversion to u32 with overflow checking

[]

Conversion to u64 with overflow checking

[]

Returns

[]

Return the least number of bits needed to represent the number

[]

Return if specific bit is set

[]

Return single byte

[]

Convert to the sequence of bytes with a big endian

[]

Convert to the sequence of bytes with a little endian

[]

Convert to a non-zero-prefixed hex representation (not prefixed by 0x).

[]

Create Uint(10**n)

[]

Returns new instance equalling zero.

[]

Returns new instance equalling one.

[]

Returns the largest value that can be represented by this integer type.

[]

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

[]

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

[]

Optimized instructions

[]

Subtract another Uint from this returning result and possible overflow

[]

Multiple this Uint with other returning result and possible overflow

[]

Divide this Uint by other returning result and possible overflow

[]

Returns reminder of division of this Uint by other and possible overflow

[]

Returns negation of this Uint and overflow (always true)

impl Not for U256
[+]

The resulting type after applying the ! operator.

[]

Performs the unary ! operation.

impl Shl<usize> for U256
[+]

The resulting type after applying the << operator.

[]

Performs the << operation.

impl Div<U256> for U256
[+]

The resulting type after applying the / operator.

[]

Performs the / operation.

impl From<isize> for U256
[+]

[]

Performs the conversion.

impl From<U256> for U128
[+]

[]

Performs the conversion.

impl From<u64> for U256
[+]

[]

Performs the conversion.

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

[]

Performs the conversion.

impl From<usize> for U256
[+]

[]

Performs the conversion.

impl From<u8> for U256
[+]

[]

Performs the conversion.

impl From<U128> for U256
[+]

[]

Performs the conversion.

impl From<U256> for u64
[+]

[]

Performs the conversion.

impl From<U256> for u32
[+]

[]

Performs the conversion.

impl From<i16> for U256
[+]

[]

Performs the conversion.

impl From<i32> for U256
[+]

[]

Performs the conversion.

impl<'a> From<&'a [u8]> for U256
[+]

[]

Performs the conversion.

impl From<u32> for U256
[+]

[]

Performs the conversion.

impl From<i8> for U256
[+]

[]

Performs the conversion.

impl From<&'static str> for U256
[+]

[]

Performs the conversion.

impl From<U256> for U512
[+]

[]

Performs the conversion.

impl From<i64> for U256
[+]

[]

Performs the conversion.

impl From<u16> for U256
[+]

[]

Performs the conversion.

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

[]

Performs the conversion.

impl From<U512> for U256
[+]

[]

Performs the conversion.

impl PartialOrd<U256> for U256
[+]

[]

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 Display for U256
[+]

[]

Formats the value using the given formatter. Read more

impl HeapSizeOf for U256
[+]

[]

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

impl Copy for U256

impl LowerHex for U256
[+]

[]

Formats the value using the given formatter.

impl Clone for U256
[+]

[]

Returns a copy of the value. Read more

[]

Performs copy-assignment from source. Read more

impl BitAnd<U256> for U256
[+]

The resulting type after applying the & operator.

[]

Performs the & operation.

impl Add<U256> for U256
[+]

The resulting type after applying the + operator.

[]

Performs the + operation.

impl Rem<U256> for U256
[+]

The resulting type after applying the % operator.

[]

Performs the % operation.

impl Default for U256
[+]

[]

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

impl Shr<usize> for U256
[+]

The resulting type after applying the >> operator.

[]

Performs the >> operation.

impl Sub<U256> for U256
[+]

The resulting type after applying the - operator.

[]

Performs the - operation.

impl BitOr<U256> for U256
[+]

The resulting type after applying the | operator.

[]

Performs the | operation.

Auto Trait Implementations

impl Send for U256

impl Sync for U256

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]
[]

[]

Creates owned data from borrowed data, usually by cloning. Read more

[]

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

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> From for T
[src]
[]

[]

Performs the conversion.

impl<T> ToString for T where
    T: Display + ?Sized
[src]
[]

[]

Converts the given value to a String. Read more

impl<T, U> Into for T where
    U: From<T>, 
[src]
[]

[]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]
[]

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

The type returned in the event of a conversion error.

[]

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

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]
[]

Important traits for &'a mut R
[]

Immutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]
[]

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

The type returned in the event of a conversion error.

[]

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

Performs the conversion.

impl<T> BorrowMut for T where
    T: ?Sized
[src]
[]

Important traits for &'a mut R
[]

Mutably borrows from an owned value. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]
[]

[]

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

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more