pub trait VectorStore: Send + Sync {
// Required methods
fn add_documents<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
docs: &'life1 [Document],
opt: &'life2 VecStoreOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn similarity_search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
opt: &'life2 VecStoreOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<Document>, Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Required Methods§
fn add_documents<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
docs: &'life1 [Document],
opt: &'life2 VecStoreOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn similarity_search<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 str,
limit: usize,
opt: &'life2 VecStoreOptions,
) -> Pin<Box<dyn Future<Output = Result<Vec<Document>, Box<dyn Error>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Trait Implementations§
Source§impl<VS> From<VS> for Box<dyn VectorStore>where
VS: 'static + VectorStore,
impl<VS> From<VS> for Box<dyn VectorStore>where
VS: 'static + VectorStore,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".