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, Global>, OneErr>> + Send, Global>>;
    fn write_entry(
        &self,
        entry: Arc<LairEntryInner, Global>
    ) -> Pin<Box<dyn Future<Output = Result<(), OneErr>> + Send, Global>>;
    fn get_entry_by_tag(
        &self,
        tag: Arc<str, Global>
    ) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner, Global>, OneErr>> + Send, Global>>;
    fn get_entry_by_ed25519_pub_key(
        &self,
        ed25519_pub_key: BinDataSized<32>
    ) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner, Global>, OneErr>> + Send, Global>>;
    fn get_entry_by_x25519_pub_key(
        &self,
        x25519_pub_key: BinDataSized<32>
    ) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner, Global>, OneErr>> + Send, Global>>;
}
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, Global>, OneErr>> + Send, Global>>

List the entries tracked by the lair store.

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

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

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

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, Global>, OneErr>> + Send, Global>>

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, Global>, OneErr>> + Send, Global>>

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, Global>, OneErr>> + Send, Global>>

§

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

§

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

§

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

§

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

Implementors§