pub struct CachePublicKey<C: Curve, S: Signer<C>> { /* private fields */ }Expand description
An adaptor for Signer that caches the .public_key.
See .cache_public_key() for usages.
Trait Implementations§
Source§impl<C: Curve, S> Clone for CachePublicKey<C, S>
impl<C: Curve, S> Clone for CachePublicKey<C, S>
Source§impl<C: Curve, S> Debug for CachePublicKey<C, S>
impl<C: Curve, S> Debug for CachePublicKey<C, S>
Source§impl<C: Curve, S> PartialEq for CachePublicKey<C, S>
impl<C: Curve, S> PartialEq for CachePublicKey<C, S>
Source§impl<C, S> RecoverableSigner<C> for CachePublicKey<C, S>
impl<C, S> RecoverableSigner<C> for CachePublicKey<C, S>
Source§fn sign_recoverable(
&self,
msg: &[u8],
) -> impl Future<Output = Result<(C::Signature, <C as RecoverableCurve>::RecoveryId), Self::Error>> + Send
fn sign_recoverable( &self, msg: &[u8], ) -> impl Future<Output = Result<(C::Signature, <C as RecoverableCurve>::RecoveryId), Self::Error>> + Send
Sign a given message and return a signature along with recovery id. Read more
Source§impl<C, S> Signer<C> for CachePublicKey<C, S>
impl<C, S> Signer<C> for CachePublicKey<C, S>
Source§fn public_key(&self) -> C::PublicKey
fn public_key(&self) -> C::PublicKey
Get the public key of the signer.
impl<C: Curve, S> Eq for CachePublicKey<C, S>
Auto Trait Implementations§
impl<C, S> Freeze for CachePublicKey<C, S>
impl<C, S> RefUnwindSafe for CachePublicKey<C, S>
impl<C, S> Send for CachePublicKey<C, S>
impl<C, S> Sync for CachePublicKey<C, S>
impl<C, S> Unpin for CachePublicKey<C, S>
impl<C, S> UnsafeUnpin for CachePublicKey<C, S>
impl<C, S> UnwindSafe for CachePublicKey<C, S>
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§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 Q
impl<Q, K> Equivalent<K> for Q
§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<S> SignerExt for S
impl<S> SignerExt for S
Source§fn public_key<C: Curve>(&self) -> C::PublicKeywhere
Self: Signer<C>,
fn public_key<C: Curve>(&self) -> C::PublicKeywhere
Self: Signer<C>,
Get the public key of the signer on a curve
C. Read moreSource§fn sign<C: Curve>(
&self,
msg: &[u8],
) -> impl Future<Output = Result<C::Signature, Self::Error>> + Sendwhere
Self: Signer<C>,
fn sign<C: Curve>(
&self,
msg: &[u8],
) -> impl Future<Output = Result<C::Signature, Self::Error>> + Sendwhere
Self: Signer<C>,
Sign a given message and return a signature. Read more
Source§fn sign_recoverable<C: RecoverableCurve>(
&self,
msg: &[u8],
) -> impl Future<Output = Result<(C::Signature, C::RecoveryId), Self::Error>> + Sendwhere
Self: RecoverableSigner<C>,
fn sign_recoverable<C: RecoverableCurve>(
&self,
msg: &[u8],
) -> impl Future<Output = Result<(C::Signature, C::RecoveryId), Self::Error>> + Sendwhere
Self: RecoverableSigner<C>,
Sign a given message and return a signature along with recovery id. Read more
Source§fn cache_public_key<C: Curve>(self) -> CachePublicKey<C, Self>
fn cache_public_key<C: Curve>(self) -> CachePublicKey<C, Self>
Calculate
.public_key() and cache its value for
further invocations. Read more