pub struct Identity { /* private fields */ }Expand description
A long-term identity: an X25519 agreement key and an Ed25519 signing key, generated once and kept for the lifetime of an account.
Implementations§
Source§impl Identity
impl Identity
Sourcepub fn generate(rng: &mut impl RandomSource) -> Self
pub fn generate(rng: &mut impl RandomSource) -> Self
Generate a fresh identity from caller-supplied randomness.
Sourcepub const fn public(&self) -> IdentityPublic
pub const fn public(&self) -> IdentityPublic
The public half of this identity, safe to publish.
Sourcepub fn fingerprint(&self) -> Fingerprint
pub fn fingerprint(&self) -> Fingerprint
This identity’s own fingerprint, derived from its signing key.
Auto Trait Implementations§
impl Freeze for Identity
impl RefUnwindSafe for Identity
impl Send for Identity
impl Sync for Identity
impl Unpin for Identity
impl UnsafeUnpin for Identity
impl UnwindSafe for Identity
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