pub struct LegacySig {
pub sig: Signature,
pub sighash_type: SighashType,
}
Fields§
§sig: Signature
The underlying ECDSA Signature
sighash_type: SighashType
The corresponding hash type
Implementations§
Source§impl LegacySig
impl LegacySig
Sourcepub fn sighash_all(sig: Signature) -> LegacySig
pub fn sighash_all(sig: Signature) -> LegacySig
Constructs an ECDSA bitcoin signature for [SighashType::All
].
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<LegacySig, SigError>
pub fn from_bytes(bytes: &[u8]) -> Result<LegacySig, SigError>
Deserializes from slice following the standardness rules for
SighashType
.
Trait Implementations§
Source§impl StrictDecode for LegacySig
impl StrictDecode for LegacySig
fn strict_decode(reader: &mut impl TypedRead) -> Result<LegacySig, DecodeError>
fn strict_read(reader: impl ReadRaw) -> Result<Self, DecodeError>
Source§impl StrictDumb for LegacySig
impl StrictDumb for LegacySig
fn strict_dumb() -> LegacySig
Source§impl StrictEncode for LegacySig
impl StrictEncode for LegacySig
fn strict_encode<W>(&self, writer: W) -> Result<W, Error>where
W: TypedWrite,
fn strict_write(&self, writer: impl WriteRaw) -> Result<(), Error>
Source§impl StrictStruct for LegacySig
impl StrictStruct for LegacySig
const ALL_FIELDS: &'static [&'static str]
fn strict_check_fields()
fn strict_type_info() -> TypeInfo<Self>
Source§impl StrictType for LegacySig
impl StrictType for LegacySig
const STRICT_LIB_NAME: &'static str = LIB_NAME_BITCOIN
fn strict_name() -> Option<TypeName>
impl Copy for LegacySig
impl Eq for LegacySig
impl StrictProduct for LegacySig
impl StructuralPartialEq for LegacySig
Auto Trait Implementations§
impl Freeze for LegacySig
impl RefUnwindSafe for LegacySig
impl Send for LegacySig
impl Sync for LegacySig
impl Unpin for LegacySig
impl UnwindSafe for LegacySig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.