pub trait NodeIdentity {
type Error;
// Required methods
fn public_key(&self) -> &PublicKey;
async fn sign(&self, message: &[u8]) -> Result<[u8; 64], Self::Error>;
async fn agree(&self, peer: &PublicKey) -> Result<SharedSecret, Self::Error>;
// Provided method
fn hint(&self) -> NodeHint { ... }
}Expand description
Node identity capable of signing and key agreement.
Required Associated Types§
Required Methods§
Sourcefn public_key(&self) -> &PublicKey
fn public_key(&self) -> &PublicKey
Return the long-term Ed25519 public key for this identity.
Provided Methods§
Sourcefn hint(&self) -> NodeHint
fn hint(&self) -> NodeHint
Return the three-byte node hint derived from 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.