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