pub struct Signature {
pub signature: Signature,
pub sighash_type: EcdsaSighashType,
}
Expand description
An ECDSA signature with the corresponding hash type.
Fields§
§signature: Signature
The underlying ECDSA Signature.
sighash_type: EcdsaSighashType
The corresponding hash type.
Implementations§
Source§impl Signature
impl Signature
Sourcepub fn sighash_all(signature: Signature) -> Signature
pub fn sighash_all(signature: Signature) -> Signature
Constructs an ECDSA Bitcoin signature for EcdsaSighashType::All
.
Sourcepub fn from_slice(sl: &[u8]) -> Result<Self, Error>
pub fn from_slice(sl: &[u8]) -> Result<Self, Error>
Deserializes from slice following the standardness rules for EcdsaSighashType
.
Sourcepub fn serialize(&self) -> SerializedSignature
pub fn serialize(&self) -> SerializedSignature
Serializes an ECDSA signature (inner secp256k1 signature in DER format).
This does not perform extra heap allocation.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Signature
impl<'de> Deserialize<'de> for Signature
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Signature
impl Eq for Signature
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
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