Struct bitcoin_primitives::BaseUInt
source · pub struct BaseUInt<const BITS: usize> { /* private fields */ }Expand description
| Template base class for unsigned big | integers. |
Implementations§
source§impl<const BITS: usize> BaseUInt<BITS>
impl<const BITS: usize> BaseUInt<BITS>
pub const WIDTH: usize = _
pub fn new_from_other(b: &BaseUInt<BITS>) -> Self
pub fn assign_from_other(&mut self, b: &BaseUInt<BITS>) -> &mut BaseUInt<BITS>
pub fn new_from_u64(b: u64) -> Self
pub fn assign_from_u64(&mut self, b: u64) -> &mut BaseUInt<BITS>
pub fn prefix_increment(&mut self) -> &mut BaseUInt<BITS>
pub fn postfix_increment(&mut self, _0: i32) -> BaseUInt<BITS>
pub fn prefix_decrement(&mut self) -> &mut BaseUInt<BITS>
pub fn postfix_decrement(&mut self, _0: i32) -> BaseUInt<BITS>
pub fn size(&self) -> u32
pub fn get_low64(&self) -> u64
source§impl<const BITS: usize> BaseUInt<BITS>
impl<const BITS: usize> BaseUInt<BITS>
pub fn compare_to(&self, b: &BaseUInt<BITS>) -> i32
pub fn equal_to(&self, b: u64) -> bool
pub fn getdouble(&self) -> f64
pub fn get_hex(&self) -> String
pub fn set_hex(&mut self, psz: *const u8)
pub fn set_hex_with_str(&mut self, str_: &str)
pub fn to_string(&self) -> String
Trait Implementations§
source§impl<const BITS: usize> AddAssign<&BaseUInt<BITS>> for BaseUInt<BITS>
impl<const BITS: usize> AddAssign<&BaseUInt<BITS>> for BaseUInt<BITS>
source§fn add_assign(&mut self, other: &BaseUInt<BITS>)
fn add_assign(&mut self, other: &BaseUInt<BITS>)
Performs the
+= operation. Read moresource§impl<const BITS: usize> AddAssign<u64> for BaseUInt<BITS>
impl<const BITS: usize> AddAssign<u64> for BaseUInt<BITS>
source§fn add_assign(&mut self, other: u64)
fn add_assign(&mut self, other: u64)
Performs the
+= operation. Read moresource§impl<const BITS: usize> BitAndAssign<&BaseUInt<BITS>> for BaseUInt<BITS>
impl<const BITS: usize> BitAndAssign<&BaseUInt<BITS>> for BaseUInt<BITS>
source§fn bitand_assign(&mut self, b: &BaseUInt<BITS>)
fn bitand_assign(&mut self, b: &BaseUInt<BITS>)
Performs the
&= operation. Read moresource§impl<const BITS: usize> BitOrAssign<&BaseUInt<BITS>> for BaseUInt<BITS>
impl<const BITS: usize> BitOrAssign<&BaseUInt<BITS>> for BaseUInt<BITS>
source§fn bitor_assign(&mut self, b: &BaseUInt<BITS>)
fn bitor_assign(&mut self, b: &BaseUInt<BITS>)
Performs the
|= operation. Read moresource§impl<const BITS: usize> BitOrAssign<u64> for BaseUInt<BITS>
impl<const BITS: usize> BitOrAssign<u64> for BaseUInt<BITS>
source§fn bitor_assign(&mut self, b: u64)
fn bitor_assign(&mut self, b: u64)
Performs the
|= operation. Read moresource§impl<const BITS: usize> BitXorAssign<&BaseUInt<BITS>> for BaseUInt<BITS>
impl<const BITS: usize> BitXorAssign<&BaseUInt<BITS>> for BaseUInt<BITS>
source§fn bitxor_assign(&mut self, b: &BaseUInt<BITS>)
fn bitxor_assign(&mut self, b: &BaseUInt<BITS>)
Performs the
^= operation. Read moresource§impl<const BITS: usize> BitXorAssign<u64> for BaseUInt<BITS>
impl<const BITS: usize> BitXorAssign<u64> for BaseUInt<BITS>
source§fn bitxor_assign(&mut self, b: u64)
fn bitxor_assign(&mut self, b: u64)
Performs the
^= operation. Read moresource§impl<const BITS: usize> DivAssign<&BaseUInt<BITS>> for BaseUInt<BITS>
impl<const BITS: usize> DivAssign<&BaseUInt<BITS>> for BaseUInt<BITS>
source§fn div_assign(&mut self, b: &BaseUInt<BITS>)
fn div_assign(&mut self, b: &BaseUInt<BITS>)
Performs the
/= operation. Read moresource§impl<const BITS: usize> MulAssign<&BaseUInt<BITS>> for BaseUInt<BITS>
impl<const BITS: usize> MulAssign<&BaseUInt<BITS>> for BaseUInt<BITS>
source§fn mul_assign(&mut self, b: &BaseUInt<BITS>)
fn mul_assign(&mut self, b: &BaseUInt<BITS>)
Performs the
*= operation. Read moresource§impl<const BITS: usize> MulAssign<u32> for BaseUInt<BITS>
impl<const BITS: usize> MulAssign<u32> for BaseUInt<BITS>
source§fn mul_assign(&mut self, b32: u32)
fn mul_assign(&mut self, b32: u32)
Performs the
*= operation. Read moresource§impl<const BITS: usize> Ord for BaseUInt<BITS>
impl<const BITS: usize> Ord for BaseUInt<BITS>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<const BITS: usize> PartialEq<BaseUInt<BITS>> for BaseUInt<BITS>
impl<const BITS: usize> PartialEq<BaseUInt<BITS>> for BaseUInt<BITS>
source§impl<const BITS: usize> PartialOrd<BaseUInt<BITS>> for BaseUInt<BITS>
impl<const BITS: usize> PartialOrd<BaseUInt<BITS>> for BaseUInt<BITS>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl<const BITS: usize> ShlAssign<u32> for BaseUInt<BITS>
impl<const BITS: usize> ShlAssign<u32> for BaseUInt<BITS>
source§fn shl_assign(&mut self, shift: u32)
fn shl_assign(&mut self, shift: u32)
Performs the
<<= operation. Read moresource§impl<const BITS: usize> ShrAssign<u32> for BaseUInt<BITS>
impl<const BITS: usize> ShrAssign<u32> for BaseUInt<BITS>
source§fn shr_assign(&mut self, shift: u32)
fn shr_assign(&mut self, shift: u32)
Performs the
>>= operation. Read moresource§impl<const BITS: usize> SubAssign<&BaseUInt<BITS>> for BaseUInt<BITS>
impl<const BITS: usize> SubAssign<&BaseUInt<BITS>> for BaseUInt<BITS>
source§fn sub_assign(&mut self, other: &BaseUInt<BITS>)
fn sub_assign(&mut self, other: &BaseUInt<BITS>)
Performs the
-= operation. Read moresource§impl<const BITS: usize> SubAssign<u64> for BaseUInt<BITS>
impl<const BITS: usize> SubAssign<u64> for BaseUInt<BITS>
source§fn sub_assign(&mut self, other: u64)
fn sub_assign(&mut self, other: u64)
Performs the
-= operation. Read moreimpl<const BITS: usize> Eq for BaseUInt<BITS>
Auto Trait Implementations§
impl<const BITS: usize> RefUnwindSafe for BaseUInt<BITS>
impl<const BITS: usize> Send for BaseUInt<BITS>
impl<const BITS: usize> Sync for BaseUInt<BITS>
impl<const BITS: usize> Unpin for BaseUInt<BITS>
impl<const BITS: usize> UnwindSafe for BaseUInt<BITS>
Blanket Implementations§
§impl<T, U> CastInto<U> for Twhere
U: CastFrom<T>,
impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> StaticUpcast<T> for T
impl<T> StaticUpcast<T> for T
§unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
Convert type of a const pointer. Read more