Trait StorageBackend
Source pub trait StorageBackend: Send + Sync {
Show 14 methods
// Required methods
fn exists<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn create_index<'life0, 'life1, 'async_trait>(
&'life0 mut self,
config: &'life1 CreateIndexConfig,
) -> Pin<Box<dyn Future<Output = Result<(), VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn get_item<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<VectorItem>, VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn insert_item<'life0, 'life1, 'async_trait>(
&'life0 mut self,
item: &'life1 VectorItem,
) -> Pin<Box<dyn Future<Output = Result<(), VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn update_item<'life0, 'life1, 'async_trait>(
&'life0 mut self,
item: &'life1 VectorItem,
) -> Pin<Box<dyn Future<Output = Result<(), VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn delete_item<'life0, 'life1, 'async_trait>(
&'life0 mut self,
id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn list_items<'life0, 'async_trait>(
&'life0 self,
options: Option<ListOptions>,
) -> Pin<Box<dyn Future<Output = Result<Vec<VectorItem>, VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn query_items<'life0, 'life1, 'async_trait>(
&'life0 self,
query: &'life1 Query,
) -> Pin<Box<dyn Future<Output = Result<Vec<QueryResult>, VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn begin_transaction<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn commit_transaction<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn rollback_transaction<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn delete_index<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn get_stats<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<IndexStats, VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
// Provided method
fn insert_items<'life0, 'life1, 'async_trait>(
&'life0 mut self,
items: &'life1 [VectorItem],
) -> Pin<Box<dyn Future<Output = Result<(), VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait { ... }
}