Struct bitcoin_primitives::BaseBlob
source · pub struct BaseBlob<const BITS: usize> {
pub data: [u8; { _ }],
}
Expand description
| Template base class for fixed-sized | opaque blobs. |
Fields§
§data: [u8; { _ }]
Implementations§
source§impl<const BITS: usize> BaseBlob<BITS>
impl<const BITS: usize> BaseBlob<BITS>
pub const ZERO: Self = _
pub const ONE: Self = _
pub const fn zero() -> Self
pub const fn one() -> Self
pub fn is_null(&self) -> bool
pub fn set_null(&mut self)
pub fn compare(&self, other: &BaseBlob<BITS>) -> i32
pub fn data(&self) -> *const u8
pub fn data_mut(&mut self) -> *mut u8
pub fn begin_mut(&mut self) -> *mut u8
pub fn end_mut(&mut self) -> *mut u8
pub fn begin(&self) -> *const u8
pub fn end(&self) -> *const u8
pub fn size(&self) -> u32
pub fn get_u64(&self, pos: i32) -> u64
pub fn serialize<Stream>(&self, s: &mut Stream)
pub fn unserialize<Stream>(&mut self, s: &mut Stream)
pub fn get_hex(&self) -> String
pub fn set_hex(&mut self, psz: *const u8)
pub fn set_hex_from_str(&mut self, str_: &str)
pub fn to_string(&self) -> String
Trait Implementations§
source§impl<const BITS: usize> Ord for BaseBlob<BITS>
impl<const BITS: usize> Ord for BaseBlob<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<BaseBlob<BITS>> for BaseBlob<BITS>
impl<const BITS: usize> PartialEq<BaseBlob<BITS>> for BaseBlob<BITS>
source§impl<const BITS: usize> PartialOrd<BaseBlob<BITS>> for BaseBlob<BITS>
impl<const BITS: usize> PartialOrd<BaseBlob<BITS>> for BaseBlob<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 moreimpl<const BITS: usize> Eq for BaseBlob<BITS>
impl<const BITS: usize> Send for BaseBlob<BITS>
impl<const BITS: usize> Sync for BaseBlob<BITS>
Auto Trait Implementations§
impl<const BITS: usize> RefUnwindSafe for BaseBlob<BITS>
impl<const BITS: usize> Unpin for BaseBlob<BITS>
impl<const BITS: usize> UnwindSafe for BaseBlob<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