[]Struct bitcoin::util::taproot::TapBranchHash

pub struct TapBranchHash(_);

Taproot-tagged hash for tapscript Merkle tree branches

Methods

impl TapBranchHash

pub fn from_hash(inner: Hash<TapBranchTag>) -> TapBranchHash

Create this type from the inner hash type.

pub fn as_hash(&self) -> Hash<TapBranchTag>

Convert this type into the inner hash type.

Trait Implementations

impl From<Hash<TapBranchTag>> for TapBranchHash

impl From<TapBranchHash> for Hash<TapBranchTag>

impl AsRef<[u8]> for TapBranchHash

impl Ord for TapBranchHash

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialOrd<TapBranchHash> for TapBranchHash

impl Default for TapBranchHash

impl Clone for TapBranchHash

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<TapBranchHash> for TapBranchHash

impl Eq for TapBranchHash

impl Copy for TapBranchHash

impl Display for TapBranchHash

impl Debug for TapBranchHash

impl Deref for TapBranchHash

type Target = [u8]

The resulting type after dereferencing.

impl Index<usize> for TapBranchHash

type Output = u8

The returned type after indexing.

impl Index<Range<usize>> for TapBranchHash

type Output = [u8]

The returned type after indexing.

impl Index<RangeFrom<usize>> for TapBranchHash

type Output = [u8]

The returned type after indexing.

impl Index<RangeTo<usize>> for TapBranchHash

type Output = [u8]

The returned type after indexing.

impl Index<RangeFull> for TapBranchHash

type Output = [u8]

The returned type after indexing.

impl Hash for TapBranchHash

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl FromStr for TapBranchHash

type Err = Error

The associated error which can be returned from parsing.

impl LowerHex for TapBranchHash

impl Borrow<[u8]> for TapBranchHash

impl Hash for TapBranchHash

type Engine = <Hash<TapBranchTag> 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. Read more

type Inner = <Hash<TapBranchTag> as Hash>::Inner

The byte array that represents the hash internally

fn hash(data: &[u8]) -> Self[src]

Hashes some bytes

Auto Trait Implementations

impl Unpin for TapBranchHash

impl Sync for TapBranchHash

impl Send for TapBranchHash

impl UnwindSafe for TapBranchHash

impl RefUnwindSafe for TapBranchHash

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToHex for T where
    T: LowerHex
[src]

fn to_hex(&self) -> String[src]

Outputs the hash in hexadecimal form

impl<T> FromHex for T where
    T: Hash
[src]

fn from_hex(s: &str) -> Result<Self, Error>[src]

Produce an object from a hex string

impl<T> ToBase32 for T where
    T: AsRef<[u8]>, 
[src]

fn to_base32(&self) -> Vec<u5>[src]

Convert Self to base32 vector

impl<T> Base32Len for T where
    T: AsRef<[u8]>, 
[src]

impl<'f, T> CheckBase32<Vec<u5>> for T where
    T: AsRef<[u8]>, 
[src]

type Err = Error

Error type if conversion fails