pub trait ANNIndexOwned<const N: usize> {
// Required methods
fn insert_with_rng(
&mut self,
vector: Vector<N>,
id: String,
rng: &mut impl Rng,
);
fn delete_by_id(&mut self, id: String);
fn search(&self, query: &Vector<N>, top_k: usize) -> Vec<(String, f32)>;
// Provided method
fn insert(&mut self, vector: Vector<N>, id: String) { ... }
}Required Methods§
Sourcefn insert_with_rng(&mut self, vector: Vector<N>, id: String, rng: &mut impl Rng)
fn insert_with_rng(&mut self, vector: Vector<N>, id: String, rng: &mut impl Rng)
Insert a vector into the index with a custom rng.
Sourcefn delete_by_id(&mut self, id: String)
fn delete_by_id(&mut self, id: String)
Delete a vector from the index by id.
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.