pub struct Sig(_);
Expand description
Represents Ethereum-style “recoverable signatures”.
Implementations
sourceimpl Sig
impl Sig
sourcepub fn from_bytes(b: &[u8]) -> Result<Self>
pub fn from_bytes(b: &[u8]) -> Result<Self>
Loads the recoverable signature from the bytes.
sourcepub fn recover_public_key(&self, digest: &[u8]) -> Result<(Key, VerifyingKey)>
pub fn recover_public_key(&self, digest: &[u8]) -> Result<(Key, VerifyingKey)>
Recovers the public key from the 32-byte SHA256 output message using its signature.
Trait Implementations
impl Eq for Sig
impl StructuralEq for Sig
impl StructuralPartialEq for Sig
Auto Trait Implementations
impl RefUnwindSafe for Sig
impl Send for Sig
impl Sync for Sig
impl Unpin for Sig
impl UnwindSafe for Sig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<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,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request