Struct elements::taproot::TapSighashHash
source · pub struct TapSighashHash(/* private fields */);
Expand description
Taproot-tagged hash for the elements taproot signature hash.
Implementations§
source§impl TapSighashHash
impl TapSighashHash
sourcepub fn from_raw_hash(inner: Hash<TapSighashTag>) -> TapSighashHash
pub fn from_raw_hash(inner: Hash<TapSighashTag>) -> TapSighashHash
Creates this wrapper type from the inner hash type.
sourcepub fn to_raw_hash(self) -> Hash<TapSighashTag>
pub fn to_raw_hash(self) -> Hash<TapSighashTag>
Returns the inner hash (sha256, sh256d etc.).
sourcepub fn as_raw_hash(&self) -> &Hash<TapSighashTag>
pub fn as_raw_hash(&self) -> &Hash<TapSighashTag>
Returns a reference to the inner hash (sha256, sh256d etc.).
Trait Implementations§
source§impl AsRef<[u8]> for TapSighashHash
impl AsRef<[u8]> for TapSighashHash
source§impl Borrow<[u8]> for TapSighashHash
impl Borrow<[u8]> for TapSighashHash
source§impl Clone for TapSighashHash
impl Clone for TapSighashHash
source§fn clone(&self) -> TapSighashHash
fn clone(&self) -> TapSighashHash
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 moresource§impl Debug for TapSighashHash
impl Debug for TapSighashHash
source§impl Display for TapSighashHash
impl Display for TapSighashHash
source§impl From<Hash<TapSighashTag>> for TapSighashHash
impl From<Hash<TapSighashTag>> for TapSighashHash
source§fn from(inner: Hash<TapSighashTag>) -> TapSighashHash
fn from(inner: Hash<TapSighashTag>) -> TapSighashHash
Converts to this type from the input type.
source§impl From<TapSighashHash> for Hash<TapSighashTag>
impl From<TapSighashHash> for Hash<TapSighashTag>
source§fn from(hashtype: TapSighashHash) -> Hash<TapSighashTag>
fn from(hashtype: TapSighashHash) -> Hash<TapSighashTag>
Converts to this type from the input type.
source§impl FromStr for TapSighashHash
impl FromStr for TapSighashHash
source§impl Hash for TapSighashHash
impl Hash for TapSighashHash
§type Engine = <Hash<TapSighashTag> as Hash>::Engine
type Engine = <Hash<TapSighashTag> 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.§type Bytes = <Hash<TapSighashTag> as Hash>::Bytes
type Bytes = <Hash<TapSighashTag> as Hash>::Bytes
The byte array that represents the hash internally.
source§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.source§fn from_engine(e: Self::Engine) -> Self
fn from_engine(e: Self::Engine) -> Self
Produces a hash from the current state of a given engine.
source§fn from_slice(sl: &[u8]) -> Result<TapSighashHash, FromSliceError>
fn from_slice(sl: &[u8]) -> Result<TapSighashHash, FromSliceError>
Copies a byte slice into a hash object.
source§fn from_byte_array(bytes: Self::Bytes) -> Self
fn from_byte_array(bytes: Self::Bytes) -> Self
Constructs a hash from the underlying byte array.
source§fn to_byte_array(self) -> Self::Bytes
fn to_byte_array(self) -> Self::Bytes
Returns the underlying byte array.
source§fn as_byte_array(&self) -> &Self::Bytes
fn as_byte_array(&self) -> &Self::Bytes
Returns a reference to the underlying byte array.
source§impl Hash for TapSighashHash
impl Hash for TapSighashHash
source§impl<I: SliceIndex<[u8]>> Index<I> for TapSighashHash
impl<I: SliceIndex<[u8]>> Index<I> for TapSighashHash
source§impl LowerHex for TapSighashHash
impl LowerHex for TapSighashHash
source§impl Ord for TapSighashHash
impl Ord for TapSighashHash
source§fn cmp(&self, other: &TapSighashHash) -> Ordering
fn cmp(&self, other: &TapSighashHash) -> 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
source§impl PartialEq for TapSighashHash
impl PartialEq for TapSighashHash
source§fn eq(&self, other: &TapSighashHash) -> bool
fn eq(&self, other: &TapSighashHash) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TapSighashHash
impl PartialOrd for TapSighashHash
source§fn partial_cmp(&self, other: &TapSighashHash) -> Option<Ordering>
fn partial_cmp(&self, other: &TapSighashHash) -> 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 moresource§impl UpperHex for TapSighashHash
impl UpperHex for TapSighashHash
impl Copy for TapSighashHash
impl Eq for TapSighashHash
impl StructuralPartialEq for TapSighashHash
Auto Trait Implementations§
impl RefUnwindSafe for TapSighashHash
impl Send for TapSighashHash
impl Sync for TapSighashHash
impl Unpin for TapSighashHash
impl UnwindSafe for TapSighashHash
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