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