pub trait AsLairStore: 'static + Send + Sync {
    // Required methods
    fn get_bidi_ctx_key(&self) -> BufReadSized<32>;
    fn list_entries(
        &self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<LairEntryInfo>, OneErr>> + Send>>;
    fn write_entry(
        &self,
        entry: Arc<LairEntryInner>
    ) -> Pin<Box<dyn Future<Output = Result<(), OneErr>> + Send>>;
    fn get_entry_by_tag(
        &self,
        tag: Arc<str>
    ) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>;
    fn get_entry_by_ed25519_pub_key(
        &self,
        ed25519_pub_key: BinDataSized<32>
    ) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>;
    fn get_entry_by_x25519_pub_key(
        &self,
        x25519_pub_key: BinDataSized<32>
    ) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>;
}
Expand description

Defines a lair storage mechanism.

Required Methods§

fn get_bidi_ctx_key(&self) -> BufReadSized<32>

Return the context key for both encryption and decryption of secret data within the store that is NOT deep_locked.

fn list_entries( &self ) -> Pin<Box<dyn Future<Output = Result<Vec<LairEntryInfo>, OneErr>> + Send>>

List the entries tracked by the lair store.

fn write_entry( &self, entry: Arc<LairEntryInner> ) -> Pin<Box<dyn Future<Output = Result<(), OneErr>> + Send>>

Write a new entry to the lair store. Should error if the tag already exists.

fn get_entry_by_tag( &self, tag: Arc<str> ) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>

Get an entry from the lair store by tag.

fn get_entry_by_ed25519_pub_key( &self, ed25519_pub_key: BinDataSized<32> ) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>

Get an entry from the lair store by ed25519 pub key.

fn get_entry_by_x25519_pub_key( &self, x25519_pub_key: BinDataSized<32> ) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>

Get an entry from the lair store by x25519 pub key.

Implementations on Foreign Types§

§

impl AsLairStore for SqlPool

§

fn get_bidi_ctx_key(&self) -> BufReadSized<32>

§

fn list_entries( &self ) -> Pin<Box<dyn Future<Output = Result<Vec<LairEntryInfo>, OneErr>> + Send>>

§

fn write_entry( &self, entry: Arc<LairEntryInner> ) -> Pin<Box<dyn Future<Output = Result<(), OneErr>> + Send>>

§

fn get_entry_by_tag( &self, tag: Arc<str> ) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>

§

fn get_entry_by_ed25519_pub_key( &self, ed25519_pub_key: BinDataSized<32> ) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>

§

fn get_entry_by_x25519_pub_key( &self, x25519_pub_key: BinDataSized<32> ) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send>>

Implementors§