pub trait Store {
Show 17 methods
// Required methods
fn push_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
records: impl 'async_trait + Iterator<Item = &'life1 Record<EncryptedData>> + Send + Sync,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get<'life0, 'async_trait>(
&'life0 self,
id: RecordId,
) -> Pin<Box<dyn Future<Output = Result<Record<EncryptedData>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete<'life0, 'async_trait>(
&'life0 self,
id: RecordId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn len_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn len<'life0, 'life1, 'async_trait>(
&'life0 self,
host: HostId,
tag: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn len_tag<'life0, 'life1, 'async_trait>(
&'life0 self,
tag: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn last<'life0, 'life1, 'async_trait>(
&'life0 self,
host: HostId,
tag: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Record<EncryptedData>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn first<'life0, 'life1, 'async_trait>(
&'life0 self,
host: HostId,
tag: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Record<EncryptedData>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn re_encrypt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
old_key: &'life1 [u8; 32],
new_key: &'life2 [u8; 32],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn verify<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8; 32],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn purge<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8; 32],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn next<'life0, 'life1, 'async_trait>(
&'life0 self,
host: HostId,
tag: &'life1 str,
idx: RecordIdx,
limit: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Record<EncryptedData>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn idx<'life0, 'life1, 'async_trait>(
&'life0 self,
host: HostId,
tag: &'life1 str,
idx: RecordIdx,
) -> Pin<Box<dyn Future<Output = Result<Option<Record<EncryptedData>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<RecordStatus>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn all_tagged<'life0, 'life1, 'async_trait>(
&'life0 self,
tag: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<Record<EncryptedData>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
// Provided method
fn push<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 Record<EncryptedData>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}
Expand description
A record store stores records In more detail - we tend to need to process this into another format to actually query it. As is, the record store is intended as the source of truth for arbitrary data, which could be shell history, kvs, etc.
Required Methods§
fn push_batch<'life0, 'life1, 'async_trait>(
&'life0 self,
records: impl 'async_trait + Iterator<Item = &'life1 Record<EncryptedData>> + Send + Sync,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
id: RecordId,
) -> Pin<Box<dyn Future<Output = Result<Record<EncryptedData>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 self,
id: RecordId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn len_all<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn len<'life0, 'life1, 'async_trait>(
&'life0 self,
host: HostId,
tag: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn len_tag<'life0, 'life1, 'async_trait>(
&'life0 self,
tag: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn last<'life0, 'life1, 'async_trait>(
&'life0 self,
host: HostId,
tag: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Record<EncryptedData>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn first<'life0, 'life1, 'async_trait>(
&'life0 self,
host: HostId,
tag: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<Record<EncryptedData>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn re_encrypt<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
old_key: &'life1 [u8; 32],
new_key: &'life2 [u8; 32],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn verify<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8; 32],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn purge<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 [u8; 32],
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn next<'life0, 'life1, 'async_trait>(
&'life0 self,
host: HostId,
tag: &'life1 str,
idx: RecordIdx,
limit: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Record<EncryptedData>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn next<'life0, 'life1, 'async_trait>(
&'life0 self,
host: HostId,
tag: &'life1 str,
idx: RecordIdx,
limit: u64,
) -> Pin<Box<dyn Future<Output = Result<Vec<Record<EncryptedData>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the next limit
records, after and including the given index
Sourcefn idx<'life0, 'life1, 'async_trait>(
&'life0 self,
host: HostId,
tag: &'life1 str,
idx: RecordIdx,
) -> Pin<Box<dyn Future<Output = Result<Option<Record<EncryptedData>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn idx<'life0, 'life1, 'async_trait>(
&'life0 self,
host: HostId,
tag: &'life1 str,
idx: RecordIdx,
) -> Pin<Box<dyn Future<Output = Result<Option<Record<EncryptedData>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get the first record for a given host and tag
fn status<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<RecordStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
fn push<'life0, 'life1, 'async_trait>(
&'life0 self,
record: &'life1 Record<EncryptedData>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
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.