pub struct SegwitV0Sighash(/* private fields */);
Expand description
Hash of a transaction according to the segwit version 0 signature algorithm.
Implementations§
Source§impl SegwitV0Sighash
impl SegwitV0Sighash
Sourcepub fn from_raw_hash(inner: Hash) -> SegwitV0Sighash
pub fn from_raw_hash(inner: Hash) -> SegwitV0Sighash
Creates this wrapper type from the inner hash type.
Sourcepub fn to_raw_hash(self) -> Hash
pub fn to_raw_hash(self) -> Hash
Returns the inner hash (sha256, sh256d etc.).
Sourcepub 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§
Source§impl AsRef<[u8]> for SegwitV0Sighash
impl AsRef<[u8]> for SegwitV0Sighash
Source§impl Borrow<[u8]> for SegwitV0Sighash
impl Borrow<[u8]> for SegwitV0Sighash
Source§impl Clone for SegwitV0Sighash
impl Clone for SegwitV0Sighash
Source§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 moreSource§impl Debug for SegwitV0Sighash
impl Debug for SegwitV0Sighash
Source§impl<'de> Deserialize<'de> for SegwitV0Sighash
impl<'de> Deserialize<'de> for SegwitV0Sighash
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<SegwitV0Sighash, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<SegwitV0Sighash, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for SegwitV0Sighash
impl Display for SegwitV0Sighash
Source§impl From<Hash> for SegwitV0Sighash
impl From<Hash> for SegwitV0Sighash
Source§fn from(inner: Hash) -> SegwitV0Sighash
fn from(inner: Hash) -> SegwitV0Sighash
Converts to this type from the input type.
Source§impl From<SegwitV0Sighash> for Hash
impl From<SegwitV0Sighash> for Hash
Source§fn from(hashtype: SegwitV0Sighash) -> Hash
fn from(hashtype: SegwitV0Sighash) -> Hash
Converts to this type from the input type.
Source§impl From<SegwitV0Sighash> for Message
impl From<SegwitV0Sighash> for Message
Source§fn from(hash: SegwitV0Sighash) -> Message
fn from(hash: SegwitV0Sighash) -> Message
Converts to this type from the input type.
Source§impl FromStr for SegwitV0Sighash
impl FromStr for SegwitV0Sighash
Source§impl Hash for SegwitV0Sighash
impl Hash for SegwitV0Sighash
Source§impl Hash for SegwitV0Sighash
impl Hash for SegwitV0Sighash
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§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.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<SegwitV0Sighash, FromSliceError>
fn from_slice(sl: &[u8]) -> Result<SegwitV0Sighash, 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§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.
Source§impl<I: SliceIndex<[u8]>> Index<I> for SegwitV0Sighash
impl<I: SliceIndex<[u8]>> Index<I> for SegwitV0Sighash
Source§impl LowerHex for SegwitV0Sighash
impl LowerHex for SegwitV0Sighash
Source§impl Ord for SegwitV0Sighash
impl Ord for SegwitV0Sighash
Source§fn cmp(&self, other: &SegwitV0Sighash) -> Ordering
fn cmp(&self, other: &SegwitV0Sighash) -> 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 SegwitV0Sighash
impl PartialEq for SegwitV0Sighash
Source§impl PartialOrd for SegwitV0Sighash
impl PartialOrd for SegwitV0Sighash
Source§impl SerdeHash for SegwitV0Sighash
impl SerdeHash for SegwitV0Sighash
Source§fn from_slice_delegated(sl: &[u8]) -> Result<Self, FromSliceError>
fn from_slice_delegated(sl: &[u8]) -> Result<Self, FromSliceError>
Helper function to turn a deserialized slice into the correct hash type.
Source§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.
Source§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.
Source§impl Serialize for SegwitV0Sighash
impl Serialize for SegwitV0Sighash
Source§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