pub struct Bip340Sig {
pub sig: Signature,
pub sighash_type: Option<SighashType>,
}Fields§
§sig: SignatureThe underlying ECDSA Signature
sighash_type: Option<SighashType>The corresponding hash type
Implementations§
source§impl Bip340Sig
impl Bip340Sig
sourcepub fn sighash_default(sig: Signature) -> Self
pub fn sighash_default(sig: Signature) -> Self
Constructs an ECDSA bitcoin signature for [SighashType::All].
sourcepub fn from_bytes(bytes: &[u8]) -> Result<Self, SigError>
pub fn from_bytes(bytes: &[u8]) -> Result<Self, SigError>
Deserializes from slice following the standardness rules for
SighashType.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Bip340Sig
impl<'de> Deserialize<'de> for Bip340Sig
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
source§impl PartialEq for Bip340Sig
impl PartialEq for Bip340Sig
source§impl StrictDecode for Bip340Sig
impl StrictDecode for Bip340Sig
fn strict_decode(reader: &mut impl TypedRead) -> Result<Self, DecodeError>
fn strict_read(lim: usize, reader: impl Read) -> Result<Self, DecodeError>
source§impl StrictDumb for Bip340Sig
impl StrictDumb for Bip340Sig
fn strict_dumb() -> Self
source§impl StrictEncode for Bip340Sig
impl StrictEncode for Bip340Sig
fn strict_encode<W: TypedWrite>(&self, writer: W) -> Result<W>
fn strict_write(&self, lim: usize, writer: impl Write) -> Result<usize, Error>
source§impl StrictStruct for Bip340Sig
impl StrictStruct for Bip340Sig
const ALL_FIELDS: &'static [&'static str] = _
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
source§impl StrictType for Bip340Sig
impl StrictType for Bip340Sig
const STRICT_LIB_NAME: &'static str = LIB_NAME_BITCOIN
fn strict_name() -> Option<TypeName>
impl Copy for Bip340Sig
impl Eq for Bip340Sig
impl StrictProduct for Bip340Sig
impl StructuralEq for Bip340Sig
impl StructuralPartialEq for Bip340Sig
Auto Trait Implementations§
impl RefUnwindSafe for Bip340Sig
impl Send for Bip340Sig
impl Sync for Bip340Sig
impl Unpin for Bip340Sig
impl UnwindSafe for Bip340Sig
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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.