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

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

Little-endian large integer type

Methods

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 into_bytes(self) -> [u64; 4]
[src]

Returns the underlying bytes.

impl Uint256
[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) -> 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

impl Uint256
[src]

pub fn increment(&mut self)
[src]

Increment by 1

pub fn low_128(&self) -> Uint128
[src]

Decay to a uint128

Trait Implementations

impl BitArray for Uint256
[src]

impl<S: Encoder> Encodable<S> for Uint256
[src]

impl<D: Decoder> Decodable<D> for Uint256
[src]

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

impl Eq for Uint256
[src]

impl PartialOrd<Uint256> for Uint256
[src]

#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.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) -> bool
1.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) -> bool
1.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) -> bool
1.0.0
[src]

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

impl Copy for Uint256
[src]

impl Default for Uint256
[src]

impl PartialEq<Uint256> for Uint256
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Clone for Uint256
[src]

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

Performs copy-assignment from source. Read more

impl Ord for Uint256
[src]

fn max(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self
1.21.0
[src]

Compares and returns the minimum of two values. Read more

impl Debug for Uint256
[src]

impl Display for Uint256
[src]

impl Hash for Uint256
[src]

impl Add<Uint256> 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 Mul<Uint256> for Uint256
[src]

type Output = Uint256

The resulting type after applying the * operator.

impl Div<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 BitAnd<Uint256> for Uint256
[src]

type Output = Uint256

The resulting type after applying the & operator.

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 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 Index<usize> for Uint256
[src]

type Output = u64

The returned type after indexing.

impl Index<Range<usize>> 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<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 Rand for Uint256
[src]

Auto Trait Implementations

impl Send for Uint256

impl Sync for Uint256

Blanket Implementations

impl<T> From for T
[src]

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

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

type Owned = T

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

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

type Error = !

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

The type returned in the event of a conversion error.

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

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

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

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

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

The type returned in the event of a conversion error.

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