Struct TapSighash
pub struct TapSighash(/* private fields */);
Expand description
Taproot-tagged hash with tag "TapSighash".
This hash type is used for computing taproot signature hash.“
Implementations§
§impl TapSighash
impl TapSighash
pub fn from_raw_hash(inner: Hash<TapSighashTag>) -> TapSighash
pub fn from_raw_hash(inner: Hash<TapSighashTag>) -> TapSighash
Creates this wrapper type from the inner hash type.
pub fn to_raw_hash(self) -> Hash<TapSighashTag>
pub fn to_raw_hash(self) -> Hash<TapSighashTag>
Returns the inner hash (sha256, sh256d etc.).
pub 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§
§impl AsRef<[u8]> for TapSighash
impl AsRef<[u8]> for TapSighash
§impl AsRef<[u8; 32]> for TapSighash
impl AsRef<[u8; 32]> for TapSighash
§impl Borrow<[u8]> for TapSighash
impl Borrow<[u8]> for TapSighash
§impl Clone for TapSighash
impl Clone for TapSighash
§fn clone(&self) -> TapSighash
fn clone(&self) -> TapSighash
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 TapSighash
impl Debug for TapSighash
§impl<'de> Deserialize<'de> for TapSighash
impl<'de> Deserialize<'de> for TapSighash
§fn deserialize<D>(d: D) -> Result<TapSighash, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<TapSighash, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
§impl Display for TapSighash
impl Display for TapSighash
§impl From<Hash<TapSighashTag>> for TapSighash
impl From<Hash<TapSighashTag>> for TapSighash
§fn from(inner: Hash<TapSighashTag>) -> TapSighash
fn from(inner: Hash<TapSighashTag>) -> TapSighash
Converts to this type from the input type.
§impl From<TapSighash> for Hash<TapSighashTag>
impl From<TapSighash> for Hash<TapSighashTag>
§fn from(hashtype: TapSighash) -> Hash<TapSighashTag>
fn from(hashtype: TapSighash) -> Hash<TapSighashTag>
Converts to this type from the input type.
§impl From<TapSighash> for Message
impl From<TapSighash> for Message
§fn from(hash: TapSighash) -> Message
fn from(hash: TapSighash) -> Message
Converts to this type from the input type.
§impl FromStr for TapSighash
impl FromStr for TapSighash
§type Err = HexToArrayError
type Err = HexToArrayError
The associated error which can be returned from parsing.
§fn from_str(s: &str) -> Result<TapSighash, <TapSighash as FromStr>::Err>
fn from_str(s: &str) -> Result<TapSighash, <TapSighash as FromStr>::Err>
Parses a string
s
to return a value of this type. Read more§impl Hash for TapSighash
impl Hash for TapSighash
§impl Hash for TapSighash
impl Hash for TapSighash
§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.§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.
§fn engine() -> <TapSighash as Hash>::Engine
fn engine() -> <TapSighash as Hash>::Engine
Constructs a new engine.
§fn from_engine(e: <TapSighash as Hash>::Engine) -> TapSighash
fn from_engine(e: <TapSighash as Hash>::Engine) -> TapSighash
Produces a hash from the current state of a given engine.
§fn from_slice(sl: &[u8]) -> Result<TapSighash, FromSliceError>
fn from_slice(sl: &[u8]) -> Result<TapSighash, FromSliceError>
Copies a byte slice into a hash object.
§fn from_byte_array(bytes: <TapSighash as Hash>::Bytes) -> TapSighash
fn from_byte_array(bytes: <TapSighash as Hash>::Bytes) -> TapSighash
Constructs a hash from the underlying byte array.
§fn to_byte_array(self) -> <TapSighash as Hash>::Bytes
fn to_byte_array(self) -> <TapSighash as Hash>::Bytes
Returns the underlying byte array.
§fn as_byte_array(&self) -> &<TapSighash as Hash>::Bytes
fn as_byte_array(&self) -> &<TapSighash as Hash>::Bytes
Returns a reference to the underlying byte array.
§fn all_zeros() -> TapSighash
fn all_zeros() -> TapSighash
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<I> Index<I> for TapSighashwhere
I: SliceIndex<[u8]>,
impl<I> Index<I> for TapSighashwhere
I: SliceIndex<[u8]>,
§impl LowerHex for TapSighash
impl LowerHex for TapSighash
§impl Ord for TapSighash
impl Ord for TapSighash
§impl PartialEq for TapSighash
impl PartialEq for TapSighash
§impl PartialOrd for TapSighash
impl PartialOrd for TapSighash
§impl SerdeHash for TapSighash
impl SerdeHash for TapSighash
§fn from_slice_delegated(sl: &[u8]) -> Result<TapSighash, FromSliceError>
fn from_slice_delegated(sl: &[u8]) -> Result<TapSighash, 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 TapSighash
impl Serialize for TapSighash
§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 TapSighash
impl UpperHex for TapSighash
impl Copy for TapSighash
impl Eq for TapSighash
impl StructuralPartialEq for TapSighash
Auto Trait Implementations§
impl Freeze for TapSighash
impl RefUnwindSafe for TapSighash
impl Send for TapSighash
impl Sync for TapSighash
impl Unpin for TapSighash
impl UnwindSafe for TapSighash
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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