pub trait PrivateKey: Sealed + Sized {
type Public: PublicKey<Private = Self>;
// Required method
fn public(&self) -> Self::Public;
// Provided method
fn sign<S: Signature<PrivateKey = Self>>(
&self,
message: &[u8],
) -> Result<S, Error> { ... }
}
Expand description
The private component of a public/private key pair.
Required Associated Types§
Required Methods§
Provided Methods§
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.