Skip to main content

StorageBackend

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 { ... }
}

Required Methods§

Source

fn exists<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Source

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,

Source

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,

Source

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,

Source

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,

Source

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,

Source

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,

Source

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,

Source

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,

Source

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,

Source

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,

Source

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,

Source

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 Methods§

Source

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,

Implementations on Foreign Types§

Source§

impl StorageBackend for LegacyStorage

Source§

fn exists<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where 'life0: 'async_trait, LegacyStorage: 'async_trait,

Source§

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, LegacyStorage: 'async_trait,

Source§

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, LegacyStorage: 'async_trait,

Source§

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, LegacyStorage: 'async_trait,

Source§

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, LegacyStorage: 'async_trait,

Source§

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, LegacyStorage: 'async_trait,

Source§

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, LegacyStorage: 'async_trait,

Source§

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, LegacyStorage: 'async_trait,

Source§

fn begin_transaction<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait, LegacyStorage: 'async_trait,

Source§

fn commit_transaction<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait, LegacyStorage: 'async_trait,

Source§

fn rollback_transaction<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait, LegacyStorage: 'async_trait,

Source§

fn delete_index<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait, LegacyStorage: 'async_trait,

Source§

fn get_stats<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<IndexStats, VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait, LegacyStorage: 'async_trait,

Source§

impl StorageBackend for OptimizedStorage

Source§

fn exists<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where 'life0: 'async_trait, OptimizedStorage: 'async_trait,

Source§

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, OptimizedStorage: 'async_trait,

Source§

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, OptimizedStorage: 'async_trait,

Source§

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, OptimizedStorage: 'async_trait,

Source§

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, OptimizedStorage: 'async_trait,

Source§

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, OptimizedStorage: 'async_trait,

Source§

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, OptimizedStorage: 'async_trait,

Source§

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, OptimizedStorage: 'async_trait,

Source§

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, OptimizedStorage: 'async_trait,

Source§

fn begin_transaction<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait, OptimizedStorage: 'async_trait,

Source§

fn commit_transaction<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait, OptimizedStorage: 'async_trait,

Source§

fn rollback_transaction<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait, OptimizedStorage: 'async_trait,

Source§

fn delete_index<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait, OptimizedStorage: 'async_trait,

Source§

fn get_stats<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<IndexStats, VectraError>> + Send + 'async_trait>>
where 'life0: 'async_trait, OptimizedStorage: 'async_trait,

Implementors§