Struct bdk_chain::bitcoin::WPubkeyHash
pub struct WPubkeyHash(/* private fields */);
Expand description
SegWit version of a public key hash.
Implementations§
§impl WPubkeyHash
impl WPubkeyHash
pub fn from_raw_hash(inner: Hash) -> WPubkeyHash
pub fn from_raw_hash(inner: Hash) -> WPubkeyHash
Creates this wrapper type from the inner hash type.
pub fn to_raw_hash(self) -> Hash
pub fn to_raw_hash(self) -> Hash
Returns the inner hash (sha256, sh256d etc.).
pub fn as_raw_hash(&self) -> &Hash
pub fn as_raw_hash(&self) -> &Hash
Returns a reference to the inner hash (sha256, sh256d etc.).
Trait Implementations§
§impl AsRef<[u8]> for WPubkeyHash
impl AsRef<[u8]> for WPubkeyHash
§impl AsRef<[u8; 20]> for WPubkeyHash
impl AsRef<[u8; 20]> for WPubkeyHash
§impl AsRef<PushBytes> for WPubkeyHash
impl AsRef<PushBytes> for WPubkeyHash
§impl Borrow<[u8]> for WPubkeyHash
impl Borrow<[u8]> for WPubkeyHash
§impl Clone for WPubkeyHash
impl Clone for WPubkeyHash
§fn clone(&self) -> WPubkeyHash
fn clone(&self) -> WPubkeyHash
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for WPubkeyHash
impl Debug for WPubkeyHash
§impl<'de> Deserialize<'de> for WPubkeyHash
impl<'de> Deserialize<'de> for WPubkeyHash
§fn deserialize<D>(d: D) -> Result<WPubkeyHash, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<WPubkeyHash, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for WPubkeyHash
impl Display for WPubkeyHash
§impl From<&CompressedPublicKey> for WPubkeyHash
impl From<&CompressedPublicKey> for WPubkeyHash
§fn from(key: &CompressedPublicKey) -> WPubkeyHash
fn from(key: &CompressedPublicKey) -> WPubkeyHash
Converts to this type from the input type.
§impl From<CompressedPublicKey> for WPubkeyHash
impl From<CompressedPublicKey> for WPubkeyHash
§fn from(key: CompressedPublicKey) -> WPubkeyHash
fn from(key: CompressedPublicKey) -> WPubkeyHash
Converts to this type from the input type.
§impl From<Hash> for WPubkeyHash
impl From<Hash> for WPubkeyHash
§fn from(inner: Hash) -> WPubkeyHash
fn from(inner: Hash) -> WPubkeyHash
Converts to this type from the input type.
§impl From<WPubkeyHash> for Hash
impl From<WPubkeyHash> for Hash
§fn from(hashtype: WPubkeyHash) -> Hash
fn from(hashtype: WPubkeyHash) -> Hash
Converts to this type from the input type.
§impl From<WPubkeyHash> for PushBytesBuf
impl From<WPubkeyHash> for PushBytesBuf
§fn from(hash: WPubkeyHash) -> PushBytesBuf
fn from(hash: WPubkeyHash) -> PushBytesBuf
Converts to this type from the input type.
§impl FromStr for WPubkeyHash
impl FromStr for WPubkeyHash
§type Err = HexToArrayError
type Err = HexToArrayError
The associated error which can be returned from parsing.
§fn from_str(s: &str) -> Result<WPubkeyHash, <WPubkeyHash as FromStr>::Err>
fn from_str(s: &str) -> Result<WPubkeyHash, <WPubkeyHash as FromStr>::Err>
Parses a string
s
to return a value of this type. Read more§impl Hash for WPubkeyHash
impl Hash for WPubkeyHash
§type Engine = <Hash as Hash>::Engine
type Engine = <Hash as Hash>::Engine
A hashing engine which bytes can be serialized into. It is expected
to implement the
io::Write
trait, and to never return errors under
any conditions.§const DISPLAY_BACKWARD: bool = false
const DISPLAY_BACKWARD: bool = false
Flag indicating whether user-visible serializations of this hash
should be backward. For some reason Satoshi decided this should be
true for
Sha256dHash
, so here we are.§fn engine() -> <WPubkeyHash as Hash>::Engine
fn engine() -> <WPubkeyHash as Hash>::Engine
Constructs a new engine.
§fn from_engine(e: <WPubkeyHash as Hash>::Engine) -> WPubkeyHash
fn from_engine(e: <WPubkeyHash as Hash>::Engine) -> WPubkeyHash
Produces a hash from the current state of a given engine.
§fn from_slice(sl: &[u8]) -> Result<WPubkeyHash, FromSliceError>
fn from_slice(sl: &[u8]) -> Result<WPubkeyHash, FromSliceError>
Copies a byte slice into a hash object.
§fn from_byte_array(bytes: <WPubkeyHash as Hash>::Bytes) -> WPubkeyHash
fn from_byte_array(bytes: <WPubkeyHash as Hash>::Bytes) -> WPubkeyHash
Constructs a hash from the underlying byte array.
§fn to_byte_array(self) -> <WPubkeyHash as Hash>::Bytes
fn to_byte_array(self) -> <WPubkeyHash as Hash>::Bytes
Returns the underlying byte array.
§fn as_byte_array(&self) -> &<WPubkeyHash as Hash>::Bytes
fn as_byte_array(&self) -> &<WPubkeyHash as Hash>::Bytes
Returns a reference to the underlying byte array.
§fn all_zeros() -> WPubkeyHash
fn all_zeros() -> WPubkeyHash
Returns an all zero hash. Read more
§fn hash_byte_chunks<B, I>(byte_slices: I) -> Self
fn hash_byte_chunks<B, I>(byte_slices: I) -> Self
Hashes all the byte slices retrieved from the iterator together.
§impl Hash for WPubkeyHash
impl Hash for WPubkeyHash
§impl<I> Index<I> for WPubkeyHashwhere
I: SliceIndex<[u8]>,
impl<I> Index<I> for WPubkeyHashwhere
I: SliceIndex<[u8]>,
§impl LowerHex for WPubkeyHash
impl LowerHex for WPubkeyHash
§impl Ord for WPubkeyHash
impl Ord for WPubkeyHash
§impl PartialEq for WPubkeyHash
impl PartialEq for WPubkeyHash
§fn eq(&self, other: &WPubkeyHash) -> bool
fn eq(&self, other: &WPubkeyHash) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl PartialOrd for WPubkeyHash
impl PartialOrd for WPubkeyHash
§fn partial_cmp(&self, other: &WPubkeyHash) -> Option<Ordering>
fn partial_cmp(&self, other: &WPubkeyHash) -> Option<Ordering>
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 more§impl SerdeHash for WPubkeyHash
impl SerdeHash for WPubkeyHash
§fn from_slice_delegated(sl: &[u8]) -> Result<WPubkeyHash, FromSliceError>
fn from_slice_delegated(sl: &[u8]) -> Result<WPubkeyHash, FromSliceError>
Helper function to turn a deserialized slice into the correct hash type.
§fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Do serde serialization.
§fn deserialize<'de, D>(d: D) -> Result<Self, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<'de, D>(d: D) -> Result<Self, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Do serde deserialization.
§impl Serialize for WPubkeyHash
impl Serialize for WPubkeyHash
§fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
s: S
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
§impl UpperHex for WPubkeyHash
impl UpperHex for WPubkeyHash
impl Copy for WPubkeyHash
impl Eq for WPubkeyHash
impl StructuralPartialEq for WPubkeyHash
Auto Trait Implementations§
impl Freeze for WPubkeyHash
impl RefUnwindSafe for WPubkeyHash
impl Send for WPubkeyHash
impl Sync for WPubkeyHash
impl Unpin for WPubkeyHash
impl UnwindSafe for WPubkeyHash
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more