[][src]Struct bitcoin::util::uint::Uint128

pub struct Uint128(pub [u64; 2]);

Little-endian large integer type

Methods

impl Uint128[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; 2][src]

Returns the underlying bytes.

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

Returns the underlying bytes.

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

Returns the underlying bytes.

impl Uint128[src]

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) -> Uint128[src]

Multiplication by u32

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

Create an object from a given unsigned 64-bit integer

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

Create an object from a given signed 64-bit integer

pub fn from_be_bytes(bytes: [u8; 16]) -> Uint128[src]

Creates big integer value from a byte slice array using big-endian encoding

Trait Implementations

impl BitArray for Uint128[src]

impl Encodable for Uint128[src]

impl Decodable for Uint128[src]

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

impl Ord for Uint128[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

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

Restrict a value to a certain interval. Read more

impl PartialOrd<Uint128> for Uint128[src]

#[must_use] fn lt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use] fn le(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use] fn gt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use] fn ge(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Default for Uint128[src]

impl Clone for Uint128[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<Uint128> for Uint128[src]

impl Eq for Uint128[src]

impl Copy for Uint128[src]

impl Display for Uint128[src]

impl Debug for Uint128[src]

impl Rem<Uint128> for Uint128[src]

type Output = Uint128

The resulting type after applying the % operator.

impl Sub<Uint128> for Uint128[src]

type Output = Uint128

The resulting type after applying the - operator.

impl Add<Uint128> for Uint128[src]

type Output = Uint128

The resulting type after applying the + operator.

impl Mul<Uint128> for Uint128[src]

type Output = Uint128

The resulting type after applying the * operator.

impl Div<Uint128> for Uint128[src]

type Output = Uint128

The resulting type after applying the / operator.

impl Not for Uint128[src]

type Output = Uint128

The resulting type after applying the ! operator.

impl BitAnd<Uint128> for Uint128[src]

type Output = Uint128

The resulting type after applying the & operator.

impl BitOr<Uint128> for Uint128[src]

type Output = Uint128

The resulting type after applying the | operator.

impl BitXor<Uint128> for Uint128[src]

type Output = Uint128

The resulting type after applying the ^ operator.

impl Shl<usize> for Uint128[src]

type Output = Uint128

The resulting type after applying the << operator.

impl Shr<usize> for Uint128[src]

type Output = Uint128

The resulting type after applying the >> operator.

impl Index<usize> for Uint128[src]

type Output = u64

The returned type after indexing.

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

type Output = [u64]

The returned type after indexing.

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

type Output = [u64]

The returned type after indexing.

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

type Output = [u64]

The returned type after indexing.

impl Index<RangeFull> for Uint128[src]

type Output = [u64]

The returned type after indexing.

impl Hash for Uint128[src]

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

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

Auto Trait Implementations

impl Unpin for Uint128

impl Sync for Uint128

impl Send for Uint128

impl UnwindSafe for Uint128

impl RefUnwindSafe for Uint128

Blanket Implementations

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

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

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

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[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.

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

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

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