Struct bdk_chain::bitcoin::blockdata::block::WitnessMerkleNode
pub struct WitnessMerkleNode(/* private fields */);
Expand description
A hash corresponding to the Merkle tree root for witness data.
Implementations§
§impl WitnessMerkleNode
impl WitnessMerkleNode
pub fn from_raw_hash(inner: Hash) -> WitnessMerkleNode
pub fn from_raw_hash(inner: Hash) -> WitnessMerkleNode
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 WitnessMerkleNode
impl AsRef<[u8]> for WitnessMerkleNode
§impl AsRef<[u8; 32]> for WitnessMerkleNode
impl AsRef<[u8; 32]> for WitnessMerkleNode
§impl Borrow<[u8]> for WitnessMerkleNode
impl Borrow<[u8]> for WitnessMerkleNode
§impl Clone for WitnessMerkleNode
impl Clone for WitnessMerkleNode
§fn clone(&self) -> WitnessMerkleNode
fn clone(&self) -> WitnessMerkleNode
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 WitnessMerkleNode
impl Debug for WitnessMerkleNode
§impl Decodable for WitnessMerkleNode
impl Decodable for WitnessMerkleNode
§fn consensus_decode<R>(r: &mut R) -> Result<WitnessMerkleNode, Error>
fn consensus_decode<R>(r: &mut R) -> Result<WitnessMerkleNode, Error>
Decode an object with a well-defined format. Read more
§impl<'de> Deserialize<'de> for WitnessMerkleNode
impl<'de> Deserialize<'de> for WitnessMerkleNode
§fn deserialize<D>(
d: D
) -> Result<WitnessMerkleNode, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
d: D
) -> Result<WitnessMerkleNode, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for WitnessMerkleNode
impl Display for WitnessMerkleNode
§impl Encodable for WitnessMerkleNode
impl Encodable for WitnessMerkleNode
§impl From<Hash> for WitnessMerkleNode
impl From<Hash> for WitnessMerkleNode
§fn from(inner: Hash) -> WitnessMerkleNode
fn from(inner: Hash) -> WitnessMerkleNode
Converts to this type from the input type.
§impl From<WitnessMerkleNode> for Hash
impl From<WitnessMerkleNode> for Hash
§fn from(hashtype: WitnessMerkleNode) -> Hash
fn from(hashtype: WitnessMerkleNode) -> Hash
Converts to this type from the input type.
§impl From<Wtxid> for WitnessMerkleNode
impl From<Wtxid> for WitnessMerkleNode
§fn from(wtxid: Wtxid) -> WitnessMerkleNode
fn from(wtxid: Wtxid) -> WitnessMerkleNode
Converts to this type from the input type.
§impl FromStr for WitnessMerkleNode
impl FromStr for WitnessMerkleNode
§type Err = HexToArrayError
type Err = HexToArrayError
The associated error which can be returned from parsing.
§fn from_str(
s: &str
) -> Result<WitnessMerkleNode, <WitnessMerkleNode as FromStr>::Err>
fn from_str( s: &str ) -> Result<WitnessMerkleNode, <WitnessMerkleNode as FromStr>::Err>
Parses a string
s
to return a value of this type. Read more§impl Hash for WitnessMerkleNode
impl Hash for WitnessMerkleNode
§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 = true
const DISPLAY_BACKWARD: bool = true
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() -> <WitnessMerkleNode as Hash>::Engine
fn engine() -> <WitnessMerkleNode as Hash>::Engine
Constructs a new engine.
§fn from_engine(e: <WitnessMerkleNode as Hash>::Engine) -> WitnessMerkleNode
fn from_engine(e: <WitnessMerkleNode as Hash>::Engine) -> WitnessMerkleNode
Produces a hash from the current state of a given engine.
§fn from_slice(sl: &[u8]) -> Result<WitnessMerkleNode, FromSliceError>
fn from_slice(sl: &[u8]) -> Result<WitnessMerkleNode, FromSliceError>
Copies a byte slice into a hash object.
§fn from_byte_array(
bytes: <WitnessMerkleNode as Hash>::Bytes
) -> WitnessMerkleNode
fn from_byte_array( bytes: <WitnessMerkleNode as Hash>::Bytes ) -> WitnessMerkleNode
Constructs a hash from the underlying byte array.
§fn to_byte_array(self) -> <WitnessMerkleNode as Hash>::Bytes
fn to_byte_array(self) -> <WitnessMerkleNode as Hash>::Bytes
Returns the underlying byte array.
§fn as_byte_array(&self) -> &<WitnessMerkleNode as Hash>::Bytes
fn as_byte_array(&self) -> &<WitnessMerkleNode as Hash>::Bytes
Returns a reference to the underlying byte array.
§fn all_zeros() -> WitnessMerkleNode
fn all_zeros() -> WitnessMerkleNode
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 WitnessMerkleNode
impl Hash for WitnessMerkleNode
§impl<I> Index<I> for WitnessMerkleNodewhere
I: SliceIndex<[u8]>,
impl<I> Index<I> for WitnessMerkleNodewhere
I: SliceIndex<[u8]>,
§impl LowerHex for WitnessMerkleNode
impl LowerHex for WitnessMerkleNode
§impl Ord for WitnessMerkleNode
impl Ord for WitnessMerkleNode
§fn cmp(&self, other: &WitnessMerkleNode) -> Ordering
fn cmp(&self, other: &WitnessMerkleNode) -> Ordering
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
§impl PartialEq for WitnessMerkleNode
impl PartialEq for WitnessMerkleNode
§fn eq(&self, other: &WitnessMerkleNode) -> bool
fn eq(&self, other: &WitnessMerkleNode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.§impl PartialOrd for WitnessMerkleNode
impl PartialOrd for WitnessMerkleNode
§fn partial_cmp(&self, other: &WitnessMerkleNode) -> Option<Ordering>
fn partial_cmp(&self, other: &WitnessMerkleNode) -> 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 WitnessMerkleNode
impl SerdeHash for WitnessMerkleNode
§fn from_slice_delegated(sl: &[u8]) -> Result<WitnessMerkleNode, FromSliceError>
fn from_slice_delegated(sl: &[u8]) -> Result<WitnessMerkleNode, 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 WitnessMerkleNode
impl Serialize for WitnessMerkleNode
§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 WitnessMerkleNode
impl UpperHex for WitnessMerkleNode
impl Copy for WitnessMerkleNode
impl Eq for WitnessMerkleNode
impl StructuralPartialEq for WitnessMerkleNode
Auto Trait Implementations§
impl Freeze for WitnessMerkleNode
impl RefUnwindSafe for WitnessMerkleNode
impl Send for WitnessMerkleNode
impl Sync for WitnessMerkleNode
impl Unpin for WitnessMerkleNode
impl UnwindSafe for WitnessMerkleNode
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