pub trait VectorStoreIndex: Send + Sync {
// Required methods
fn top_n<T: for<'a> Deserialize<'a> + Send>(
&self,
query: &str,
n: usize,
) -> impl Future<Output = Result<Vec<(f64, String, T)>, VectorStoreError>> + Send;
fn top_n_ids(
&self,
query: &str,
n: usize,
) -> impl Future<Output = Result<Vec<(f64, String)>, VectorStoreError>> + Send;
}Expand description
Trait for vector store indexes
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".