pub trait VectorStoreBackend:
Send
+ Sync
+ Debug {
// Required methods
fn add<'life0, 'async_trait>(
&'life0 self,
id: String,
tenant_id: String,
vector: Vec<f32>,
metadata: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = Result<(), VectorError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
tenant_id: &'life1 str,
query: &'life2 [f32],
k: usize,
) -> Pin<Box<dyn Future<Output = Result<Vec<(f32, VectorEmbedding)>, VectorError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Generic trait for vector storage