Trait PrivateKey

Source
pub trait PrivateKey: Sized {
    type PublicKeyMaterial: PublicKey<PrivateKeyMaterial = Self>;

    // Provided method
    fn public_key(&self) -> Self::PublicKeyMaterial { ... }
}
Expand description

A type family for key material that should remain secret and has an associated type of the PublicKey family.

Required Associated Types§

Source

type PublicKeyMaterial: PublicKey<PrivateKeyMaterial = Self>

We require public / private types to be coupled, i.e. their associated type is each other.

Provided Methods§

Source

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

Returns the associated public key

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§