pub trait StorageBackend: Send + Sync {
// Required methods
fn save_entity_embeddings<'life0, 'life1, 'async_trait>(
&'life0 mut self,
embeddings: &'life1 HashMap<String, Vector>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn save_relation_embeddings<'life0, 'life1, 'async_trait>(
&'life0 mut self,
embeddings: &'life1 HashMap<String, Vector>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_entity_embeddings<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Vector>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn load_relation_embeddings<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Vector>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn save_metadata<'life0, 'life1, 'async_trait>(
&'life0 mut self,
metadata: &'life1 EmbeddingMetadata,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<EmbeddingMetadata>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<StorageStats>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 mut self,
checkpoint_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn restore_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 mut self,
checkpoint_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn list_checkpoints<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Storage backend trait
Required Methods§
Sourcefn save_entity_embeddings<'life0, 'life1, 'async_trait>(
&'life0 mut self,
embeddings: &'life1 HashMap<String, Vector>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_entity_embeddings<'life0, 'life1, 'async_trait>(
&'life0 mut self,
embeddings: &'life1 HashMap<String, Vector>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save entity embeddings
Sourcefn save_relation_embeddings<'life0, 'life1, 'async_trait>(
&'life0 mut self,
embeddings: &'life1 HashMap<String, Vector>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_relation_embeddings<'life0, 'life1, 'async_trait>(
&'life0 mut self,
embeddings: &'life1 HashMap<String, Vector>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save relation embeddings
Sourcefn load_entity_embeddings<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Vector>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_entity_embeddings<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Vector>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load entity embeddings
Sourcefn load_relation_embeddings<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Vector>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_relation_embeddings<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HashMap<String, Vector>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load relation embeddings
Sourcefn save_metadata<'life0, 'life1, 'async_trait>(
&'life0 mut self,
metadata: &'life1 EmbeddingMetadata,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn save_metadata<'life0, 'life1, 'async_trait>(
&'life0 mut self,
metadata: &'life1 EmbeddingMetadata,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Save metadata
Sourcefn load_metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<EmbeddingMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn load_metadata<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<EmbeddingMetadata>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Load metadata
Sourcefn delete<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Delete embeddings
Sourcefn get_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<StorageStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<StorageStats>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get storage statistics
Sourcefn create_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 mut self,
checkpoint_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_checkpoint<'life0, 'life1, 'async_trait>(
&'life0 mut self,
checkpoint_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create checkpoint