KeyStore

Trait KeyStore 

Source
pub trait KeyStore:
    Send
    + Sync
    + 'static {
    // Required methods
    fn get_signer(
        &self,
        key_name: &Name,
    ) -> impl Future<Output = Result<Arc<dyn Signer>, TrustError>> + Send;
    fn generate_key(
        &self,
        name: Name,
        algo: KeyAlgorithm,
    ) -> impl Future<Output = Result<Name, TrustError>> + Send;
    fn delete_key(
        &self,
        key_name: &Name,
    ) -> impl Future<Output = Result<(), TrustError>> + Send;
}
Expand description

Persistent key storage.

Required Methods§

Source

fn get_signer( &self, key_name: &Name, ) -> impl Future<Output = Result<Arc<dyn Signer>, TrustError>> + Send

Source

fn generate_key( &self, name: Name, algo: KeyAlgorithm, ) -> impl Future<Output = Result<Name, TrustError>> + Send

Source

fn delete_key( &self, key_name: &Name, ) -> impl Future<Output = Result<(), TrustError>> + Send

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§