Skip to main content

VectorStore

Trait VectorStore 

Source
pub trait VectorStore:
    Send
    + Sync
    + 'static {
    // Required methods
    fn setup_index<'life0, 'life1, 'async_trait>(
        &'life0 self,
        collection: &'life1 str,
        dimension: u32,
    ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn insert_vectors<'life0, 'life1, 'async_trait, T>(
        &'life0 self,
        collection: &'life1 str,
        records: Vec<T>,
    ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
       where T: Serialize + Send + Sync + 'static + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn search_vectors<'life0, 'life1, 'async_trait, T>(
        &'life0 self,
        collection: &'life1 str,
        vector: Vec<f32>,
        limit: u32,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<T>, String>> + Send + 'async_trait>>
       where T: DeserializeOwned + Send + Sync + 'static + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn delete_vectors<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        collection: &'life1 str,
        filter_field: &'life2 str,
        filter_value: &'life3 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
}

Required Methods§

Source

fn setup_index<'life0, 'life1, 'async_trait>( &'life0 self, collection: &'life1 str, dimension: u32, ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn insert_vectors<'life0, 'life1, 'async_trait, T>( &'life0 self, collection: &'life1 str, records: Vec<T>, ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where T: Serialize + Send + Sync + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn search_vectors<'life0, 'life1, 'async_trait, T>( &'life0 self, collection: &'life1 str, vector: Vec<f32>, limit: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<T>, String>> + Send + 'async_trait>>
where T: DeserializeOwned + Send + Sync + 'static + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn delete_vectors<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, collection: &'life1 str, filter_field: &'life2 str, filter_value: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§