[−][src]Struct bitcoin::util::uint::Uint256
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
pub fn from_be_bytes(bytes: [u8; 32]) -> Uint256
[src]
Creates big integer value from a byte slice array using big-endian encoding
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]
fn bit(&self, index: usize) -> bool
[src]
fn bit_slice(&self, start: usize, end: usize) -> Uint256
[src]
fn mask(&self, n: usize) -> Uint256
[src]
fn trailing_zeros(&self) -> usize
[src]
fn zero() -> Uint256
[src]
fn one() -> Uint256
[src]
impl Encodable for Uint256
[src]
impl Decodable for Uint256
[src]
impl<'a> From<&'a [u64]> for Uint256
[src]
impl Ord for Uint256
[src]
fn cmp(&self, other: &Uint256) -> Ordering
[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
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl PartialOrd<Uint256> for Uint256
[src]
fn partial_cmp(&self, other: &Uint256) -> Option<Ordering>
[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 Default for Uint256
[src]
impl Clone for Uint256
[src]
fn clone(&self) -> Uint256
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Uint256> for Uint256
[src]
impl Eq for Uint256
[src]
impl Copy for Uint256
[src]
impl Display for Uint256
[src]
impl Debug for Uint256
[src]
impl Rem<Uint256> for Uint256
[src]
type Output = Uint256
The resulting type after applying the %
operator.
fn rem(self, other: Uint256) -> Uint256
[src]
impl Sub<Uint256> for Uint256
[src]
type Output = Uint256
The resulting type after applying the -
operator.
fn sub(self, other: Uint256) -> Uint256
[src]
impl Add<Uint256> for Uint256
[src]
type Output = Uint256
The resulting type after applying the +
operator.
fn add(self, other: Uint256) -> Uint256
[src]
impl Mul<Uint256> for Uint256
[src]
type Output = Uint256
The resulting type after applying the *
operator.
fn mul(self, other: Uint256) -> Uint256
[src]
impl Div<Uint256> for Uint256
[src]
type Output = Uint256
The resulting type after applying the /
operator.
fn div(self, other: Uint256) -> Uint256
[src]
impl Not for Uint256
[src]
impl BitAnd<Uint256> for Uint256
[src]
type Output = Uint256
The resulting type after applying the &
operator.
fn bitand(self, other: Uint256) -> Uint256
[src]
impl BitOr<Uint256> for Uint256
[src]
type Output = Uint256
The resulting type after applying the |
operator.
fn bitor(self, other: Uint256) -> Uint256
[src]
impl BitXor<Uint256> for Uint256
[src]
type Output = Uint256
The resulting type after applying the ^
operator.
fn bitxor(self, other: Uint256) -> Uint256
[src]
impl Shl<usize> for Uint256
[src]
type Output = Uint256
The resulting type after applying the <<
operator.
fn shl(self, shift: usize) -> Uint256
[src]
impl Shr<usize> for Uint256
[src]
type Output = Uint256
The resulting type after applying the >>
operator.
fn shr(self, shift: usize) -> Uint256
[src]
impl Index<usize> for Uint256
[src]
impl Index<Range<usize>> for Uint256
[src]
type Output = [u64]
The returned type after indexing.
fn index(&self, index: Range<usize>) -> &[u64]
[src]
impl Index<RangeTo<usize>> for Uint256
[src]
type Output = [u64]
The returned type after indexing.
fn index(&self, index: RangeTo<usize>) -> &[u64]
[src]
impl Index<RangeFrom<usize>> for Uint256
[src]
type Output = [u64]
The returned type after indexing.
fn index(&self, index: RangeFrom<usize>) -> &[u64]
[src]
impl Index<RangeFull> for Uint256
[src]
impl Hash for Uint256
[src]
Auto Trait Implementations
impl Unpin for Uint256
impl Sync for Uint256
impl Send for Uint256
impl UnwindSafe for Uint256
impl RefUnwindSafe for Uint256
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,