pub trait VectorStore: Send + Sync {
type Options;
// Required methods
fn add_documents<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
docs: &'life1 [Document],
opt: &'life2 Self::Options,
) -> 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 Self::Options,
) -> 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 Associated Types§
Required Methods§
fn add_documents<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
docs: &'life1 [Document],
opt: &'life2 Self::Options,
) -> 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 Self::Options,
) -> 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, F> From<VS> for Box<dyn VectorStore<Options = F>>where
VS: 'static + VectorStore<Options = F>,
impl<VS, F> From<VS> for Box<dyn VectorStore<Options = F>>where
VS: 'static + VectorStore<Options = F>,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".