[][src]Struct extended_primitives::uint256::Uint256

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

Implementations

impl Uint256[src]

pub fn as_ptr(&self) -> *const u64[src]

Converts the object to a raw pointer

pub fn as_mut_ptr(&mut self) -> *mut u64[src]

Converts the object to a mutable raw pointer

pub fn len(&self) -> usize[src]

Returns the length of the object as an array

pub fn is_empty(&self) -> bool[src]

Returns whether the object, as an array, is empty. Always false.

pub fn as_bytes(&self) -> &[u64; 4][src]

Returns the underlying bytes.

pub fn to_bytes(&self) -> [u64; 4][src]

Returns the underlying bytes.

pub fn to_le_bytes(&self) -> [u8; 32][src]

pub fn max_value() -> Self[src]

The maximum value which can be inhabited by this type.

pub fn into_bytes(self) -> [u64; 4][src]

Returns the underlying bytes.

pub fn low_u32(&self) -> u32[src]

Conversion to u32

pub fn low_u64(&self) -> u64[src]

Conversion to u64

pub fn bits(&self) -> usize[src]

Return the least number of bits needed to represent the number

pub fn mul_u32(self, other: u32) -> Uint256[src]

Multiplication by u32

pub fn from_u64(init: u64) -> Option<Uint256>[src]

Create an object from a given unsigned 64-bit integer

pub fn from_i64(init: i64) -> Option<Uint256>[src]

Create an object from a given signed 64-bit integer

pub fn from_big_endian(slice: &[u8]) -> Self[src]

Converts from big endian representation bytes in memory.

pub fn from_bytes(slice: &[u8]) -> Self[src]

pub fn increment(&mut self)[src]

Trait Implementations

impl Add<Uint256> for Uint256[src]

type Output = Uint256

The resulting type after applying the + operator.

impl BitAnd<Uint256> for Uint256[src]

type Output = Uint256

The resulting type after applying the & operator.

impl BitArray for Uint256[src]

Little-endian large integer type

impl BitOr<Uint256> for Uint256[src]

type Output = Uint256

The resulting type after applying the | operator.

impl BitXor<Uint256> for Uint256[src]

type Output = Uint256

The resulting type after applying the ^ operator.

impl Clone for Uint256[src]

impl Copy for Uint256[src]

impl Debug for Uint256[src]

impl Default for Uint256[src]

impl Display for Uint256[src]

impl Div<Uint256> for Uint256[src]

type Output = Uint256

The resulting type after applying the / operator.

impl Eq for Uint256[src]

impl<'a> From<&'a [u64]> for Uint256[src]

impl From<[u8; 32]> for Uint256[src]

impl From<u32> for Uint256[src]

impl From<u64> for Uint256[src]

impl FromHex for Uint256[src]

type Error = FromHexError

impl Index<Range<usize>> for Uint256[src]

type Output = [u64]

The returned type after indexing.

impl Index<RangeFrom<usize>> for Uint256[src]

type Output = [u64]

The returned type after indexing.

impl Index<RangeFull> for Uint256[src]

type Output = [u64]

The returned type after indexing.

impl Index<RangeTo<usize>> for Uint256[src]

type Output = [u64]

The returned type after indexing.

impl Index<usize> for Uint256[src]

type Output = u64

The returned type after indexing.

impl Mul<Uint256> for Uint256[src]

type Output = Uint256

The resulting type after applying the * operator.

impl Not for Uint256[src]

type Output = Uint256

The resulting type after applying the ! operator.

impl Ord for Uint256[src]

impl PartialEq<Uint256> for Uint256[src]

impl PartialOrd<Uint256> for Uint256[src]

impl Shl<usize> for Uint256[src]

type Output = Uint256

The resulting type after applying the << operator.

impl Shr<usize> for Uint256[src]

type Output = Uint256

The resulting type after applying the >> operator.

impl Sub<Uint256> for Uint256[src]

type Output = Uint256

The resulting type after applying the - operator.

impl ToHex for Uint256[src]

Auto Trait Implementations

impl RefUnwindSafe for Uint256

impl Send for Uint256

impl Sync for Uint256

impl Unpin for Uint256

impl UnwindSafe for Uint256

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.