Struct etcommon_bigint::M256 [] [src]

pub struct M256(pub U256);

Represent an unsigned modulo 256-bit integer

Methods

impl M256
[src]

Zero value of M256,

One value of M256,

Maximum value of M256,

Minimum value of M256,

Bits required to represent this value.

Equals floor(log2(*)). This is always an integer.

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().

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.

Trait Implementations

impl Eq for M256
[src]

impl PartialEq for M256
[src]

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

This method tests for !=.

impl Debug for M256
[src]

Formats the value using the given formatter.

impl Copy for M256
[src]

impl Clone for M256
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Hash for M256
[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 M256
[src]

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

impl FromStr for M256
[src]

The associated error which can be returned from parsing.

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

impl Encodable for M256
[src]

Append a value to the stream

Get rlp-encoded bytes for this instance

impl Decodable for M256
[src]

Decode a value from RLP bytes

impl From<u64> for M256
[src]

Performs the conversion.

impl Into<u64> for M256
[src]

Performs the conversion.

impl From<usize> for M256
[src]

Performs the conversion.

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

Performs the conversion.

impl From<bool> for M256
[src]

Performs the conversion.

impl From<U256> for M256
[src]

Performs the conversion.

impl Into<U256> for M256
[src]

Performs the conversion.

impl From<U512> for M256
[src]

Performs the conversion.

impl Into<U512> for M256
[src]

Performs the conversion.

impl From<i32> for M256
[src]

Performs the conversion.

impl From<H256> for M256
[src]

Performs the conversion.

impl From<H160> for M256
[src]

Performs the conversion.

impl Ord for M256
[src]

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

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

The resulting type after applying the & operator

The method for the & operator

impl BitOr<M256> for M256
[src]

The resulting type after applying the | operator

The method for the | operator

impl BitXor<M256> for M256
[src]

The resulting type after applying the ^ operator

The method for the ^ operator

impl Shl<usize> for M256
[src]

The resulting type after applying the << operator

The method for the << operator

impl Shr<usize> for M256
[src]

The resulting type after applying the >> operator

The method for the >> operator

impl Add<M256> for M256
[src]

The resulting type after applying the + operator

The method for the + operator

impl Sub<M256> for M256
[src]

The resulting type after applying the - operator

The method for the - operator

impl Mul<M256> for M256
[src]

The resulting type after applying the * operator

The method for the * operator

impl Div for M256
[src]

The resulting type after applying the / operator

The method for the / operator

impl Rem for M256
[src]

The resulting type after applying the % operator

The method for the % operator

impl Not for M256
[src]

The resulting type after applying the ! operator

The method for the unary ! operator

impl LowerHex for M256
[src]

Formats the value using the given formatter.

impl UpperHex for M256
[src]

Formats the value using the given formatter.