pub struct RecoverableSignature { /* private fields */ }Expand description
A secp256k1 ECDSA signature plus the recovery id needed to recover the signing public key.
Serializes to the 65-byte TRON wire format r || s || v, where v is the
recovery id (0 or 1).
Implementations§
Source§impl RecoverableSignature
impl RecoverableSignature
Sourcepub fn from_signature(
sig: &Signature<Secp256k1>,
recovery_id: RecoveryId,
) -> RecoverableSignature
pub fn from_signature( sig: &Signature<Secp256k1>, recovery_id: RecoveryId, ) -> RecoverableSignature
Build from a non-recoverable Signature and its RecoveryId.
Sourcepub fn from_bytes(bytes: &[u8]) -> Result<RecoverableSignature, SignatureError>
pub fn from_bytes(bytes: &[u8]) -> Result<RecoverableSignature, SignatureError>
Parse the 65-byte r || s || v representation.
Accepts a v of 0/1 or the Ethereum-style 27/28, normalising to
0/1.
Sourcepub fn split(
&self,
) -> Result<(Signature<Secp256k1>, RecoveryId), SignatureError>
pub fn split( &self, ) -> Result<(Signature<Secp256k1>, RecoveryId), SignatureError>
Recover the non-recoverable Signature and RecoveryId components.
Trait Implementations§
Source§impl Clone for RecoverableSignature
impl Clone for RecoverableSignature
Source§fn clone(&self) -> RecoverableSignature
fn clone(&self) -> RecoverableSignature
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for RecoverableSignature
Source§impl Debug for RecoverableSignature
impl Debug for RecoverableSignature
impl Eq for RecoverableSignature
Source§impl Hash for RecoverableSignature
impl Hash for RecoverableSignature
Source§impl PartialEq for RecoverableSignature
impl PartialEq for RecoverableSignature
Source§fn eq(&self, other: &RecoverableSignature) -> bool
fn eq(&self, other: &RecoverableSignature) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RecoverableSignature
Auto Trait Implementations§
impl Freeze for RecoverableSignature
impl RefUnwindSafe for RecoverableSignature
impl Send for RecoverableSignature
impl Sync for RecoverableSignature
impl Unpin for RecoverableSignature
impl UnsafeUnpin for RecoverableSignature
impl UnwindSafe for RecoverableSignature
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request