pub struct SharedIdentity(pub Arc<DyoloIdentity>);Expand description
A thread-safe, clonable reference to a DyoloIdentity.
Since DyoloIdentity cannot be cloned (to preserve zeroization guarantees),
SharedIdentity provides an Arc wrapper that implements Clone and Signer.
Useful for passing a single identity into multiple async workers.
Tuple Fields§
§0: Arc<DyoloIdentity>Trait Implementations§
Source§fn verifying_key(&self) -> VerifyingKey
fn verifying_key(&self) -> VerifyingKey
Available on crate feature
async only.Return the Ed25519 public key corresponding to this signing backend.
Source§fn sign_message<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Signature> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn sign_message<'life0, 'life1, 'async_trait>(
&'life0 self,
msg: &'life1 [u8],
) -> Pin<Box<dyn Future<Output = Signature> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Available on crate feature
async only.Produce an Ed25519 signature over
msg asynchronously.Source§fn clone(&self) -> SharedIdentity
fn clone(&self) -> SharedIdentity
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 moreSource§fn verifying_key(&self) -> VerifyingKey
fn verifying_key(&self) -> VerifyingKey
Return the Ed25519 public key corresponding to this signing backend.
Auto Trait Implementations§
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