Struct bitcoin::util::schnorr::SchnorrSig
source · pub struct SchnorrSig {
pub sig: Signature,
pub hash_ty: SchnorrSighashType,
}
Expand description
A BIP340-341 serialized schnorr signature with the corresponding hash type.
Fields§
§sig: Signature
The underlying schnorr signature
hash_ty: SchnorrSighashType
The corresponding hash type
Implementations§
source§impl SchnorrSig
impl SchnorrSig
sourcepub fn from_slice(sl: &[u8]) -> Result<Self, SchnorrSigError>
pub fn from_slice(sl: &[u8]) -> Result<Self, SchnorrSigError>
Deserialize from slice
Trait Implementations§
source§impl Clone for SchnorrSig
impl Clone for SchnorrSig
source§fn clone(&self) -> SchnorrSig
fn clone(&self) -> SchnorrSig
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 SchnorrSig
impl Debug for SchnorrSig
source§impl<'de> Deserialize<'de> for SchnorrSig
impl<'de> Deserialize<'de> for SchnorrSig
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 Deserialize for SchnorrSig
impl Deserialize for SchnorrSig
source§impl Hash for SchnorrSig
impl Hash for SchnorrSig
source§impl Ord for SchnorrSig
impl Ord for SchnorrSig
source§fn cmp(&self, other: &SchnorrSig) -> Ordering
fn cmp(&self, other: &SchnorrSig) -> 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<SchnorrSig> for SchnorrSig
impl PartialEq<SchnorrSig> for SchnorrSig
source§fn eq(&self, other: &SchnorrSig) -> bool
fn eq(&self, other: &SchnorrSig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<SchnorrSig> for SchnorrSig
impl PartialOrd<SchnorrSig> for SchnorrSig
source§fn partial_cmp(&self, other: &SchnorrSig) -> Option<Ordering>
fn partial_cmp(&self, other: &SchnorrSig) -> 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 moresource§impl Serialize for SchnorrSig
impl Serialize for SchnorrSig
source§impl Serialize for SchnorrSig
impl Serialize for SchnorrSig
impl Copy for SchnorrSig
impl Eq for SchnorrSig
impl StructuralEq for SchnorrSig
impl StructuralPartialEq for SchnorrSig
Auto Trait Implementations§
impl RefUnwindSafe for SchnorrSig
impl Send for SchnorrSig
impl Sync for SchnorrSig
impl Unpin for SchnorrSig
impl UnwindSafe for SchnorrSig
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