Trait holochain::prelude::dependencies::kitsune_p2p_types::dependencies::lair_keystore_api::lair_store::traits::AsLairStore
pub trait AsLairStore: 'static + Send + Sync {
fn get_bidi_ctx_key(&self) -> BufReadSized<32>;
fn list_entries(
&self
) -> Pin<Box<dyn Future<Output = Result<Vec<LairEntryInfo, Global>, OneErr>> + Send + 'static, Global>>;
fn write_entry(
&self,
entry: Arc<LairEntryInner>
) -> Pin<Box<dyn Future<Output = Result<(), OneErr>> + Send + 'static, Global>>;
fn get_entry_by_tag(
&self,
tag: Arc<str>
) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send + 'static, Global>>;
fn get_entry_by_ed25519_pub_key(
&self,
ed25519_pub_key: BinDataSized<32>
) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send + 'static, Global>>;
fn get_entry_by_x25519_pub_key(
&self,
x25519_pub_key: BinDataSized<32>
) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send + 'static, Global>>;
}
Expand description
Defines a lair storage mechanism.
Required Methods
fn get_bidi_ctx_key(&self) -> BufReadSized<32>
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 + 'static, Global>>
fn list_entries(
&self
) -> Pin<Box<dyn Future<Output = Result<Vec<LairEntryInfo, Global>, OneErr>> + Send + 'static, Global>>
List the entries tracked by the lair store.
fn write_entry(
&self,
entry: Arc<LairEntryInner>
) -> Pin<Box<dyn Future<Output = Result<(), OneErr>> + Send + 'static, Global>>
fn write_entry(
&self,
entry: Arc<LairEntryInner>
) -> Pin<Box<dyn Future<Output = Result<(), OneErr>> + Send + 'static, 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>
) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send + 'static, Global>>
fn get_entry_by_tag(
&self,
tag: Arc<str>
) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send + 'static, 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>, OneErr>> + Send + 'static, Global>>
fn get_entry_by_ed25519_pub_key(
&self,
ed25519_pub_key: BinDataSized<32>
) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send + 'static, 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>, OneErr>> + Send + 'static, Global>>
fn get_entry_by_x25519_pub_key(
&self,
x25519_pub_key: BinDataSized<32>
) -> Pin<Box<dyn Future<Output = Result<Arc<LairEntryInner>, OneErr>> + Send + 'static, Global>>
Get an entry from the lair store by x25519 pub key.