Skip to main content

KeyPair

Trait KeyPair 

Source
pub trait KeyPair:
    Debug
    + Send
    + Sized
    + Sync {
    type PublicKey: AsRef<[u8]> + Debug + Clone + Send + Sized + Sync;

    // Required method
    fn public_key(&self) -> &Self::PublicKey;
}
Expand description

Key pairs for signing messages (private key and public key).

Required Associated Types§

Source

type PublicKey: AsRef<[u8]> + Debug + Clone + Send + Sized + Sync

The type of the public key.

Required Methods§

Source

fn public_key(&self) -> &Self::PublicKey

The public key for the key pair.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§