pub struct Ed25519Keypair { /* private fields */ }
Expand description
A struct collecting both a public, and a secret, Ed25519 key.
Implementations§
Source§impl Ed25519Keypair
impl Ed25519Keypair
Sourcepub const fn public_key(&self) -> Ed25519PublicKey
pub const fn public_key(&self) -> Ed25519PublicKey
Get the public Ed25519 key of this keypair.
Sourcepub fn sign(&self, message: &[u8]) -> Ed25519Signature
pub fn sign(&self, message: &[u8]) -> Ed25519Signature
Sign the given message with our secret key.
Trait Implementations§
Source§impl Clone for Ed25519Keypair
impl Clone for Ed25519Keypair
Source§impl Default for Ed25519Keypair
impl Default for Ed25519Keypair
Source§impl<'de> Deserialize<'de> for Ed25519Keypair
impl<'de> Deserialize<'de> for Ed25519Keypair
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Ed25519Keypair
impl RefUnwindSafe for Ed25519Keypair
impl Send for Ed25519Keypair
impl Sync for Ed25519Keypair
impl Unpin for Ed25519Keypair
impl UnwindSafe for Ed25519Keypair
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