[]Trait chain::bigint::uint::Uint

pub trait Uint: PartialEq<Self> + Eq + Ord + PartialOrd<Self> + Default + From<u64> + FromStr + Hash + Debug + Display {
    fn zero() -> Self;
fn one() -> Self;
fn max_value() -> Self;
fn from_dec_str(value: &str) -> Result<Self, FromDecStrErr>;
fn low_u32(&self) -> u32;
fn low_u64(&self) -> u64;
fn as_u32(&self) -> u32;
fn as_u64(&self) -> u64;
fn bits(&self) -> usize;
fn bit(&self, index: usize) -> bool;
fn byte(&self, index: usize) -> u8;
fn to_big_endian(&self, bytes: &mut [u8]);
fn to_little_endian(&self, result: &mut [u8]);
fn to_hex(&self) -> String;
fn exp10(n: usize) -> Self;
fn pow(self, other: Self) -> Self;
fn overflowing_pow(self, other: Self) -> (Self, bool);
fn overflowing_add(self, other: Self) -> (Self, bool);
fn overflowing_sub(self, other: Self) -> (Self, bool);
fn overflowing_mul(self, other: Self) -> (Self, bool);
fn overflowing_div(self, other: Self) -> (Self, bool);
fn overflowing_rem(self, other: Self) -> (Self, bool);
fn overflowing_neg(self) -> (Self, bool);
fn is_zero(&self) -> bool; }
[]

Large, fixed-length unsigned integer type.

Required Methods

[]

Returns new instance equalling zero.

[]

Returns new instance equalling one.

[]

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

[]

Convert from a decimal string.

[]

Conversion to u32

[]

Conversion to u64

[]

Conversion to u32 with overflow checking

[]

Conversion to u64 with overflow checking

[]

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)

[]

Return eponentation self**other. Panic on overflow.

[]

Return wrapped eponentation self**other and flag if there was an overflow

[]

Add this Uint to other returning result and possible overflow

[]

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)

[]

Returns

Implementors

impl Uint for U128
[]

[]

Conversion to u32 with overflow checking

[]

Conversion to u64 with overflow checking

[]

Return the least number of bits needed to represent the number

[]

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

impl Uint for U256
[]

[]

Conversion to u32 with overflow checking

[]

Conversion to u64 with overflow checking

[]

Return the least number of bits needed to represent the number

[]

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

impl Uint for U512
[]

[]

Conversion to u32 with overflow checking

[]

Conversion to u64 with overflow checking

[]

Return the least number of bits needed to represent the number

[]

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