pub struct ConcurrentHnsw<P, M>where
M: Metric<Point = P>,{ /* private fields */ }Expand description
Thread-safe handle to a shared HNSW index.
Implementations§
Source§impl<P, M> ConcurrentHnsw<P, M>where
M: Metric<Point = P>,
impl<P, M> ConcurrentHnsw<P, M>where
M: Metric<Point = P>,
Sourcepub fn new(config: HnswConfig, metric: M) -> IndexResult<Self>
pub fn new(config: HnswConfig, metric: M) -> IndexResult<Self>
Construct a new shared index.
Sourcepub fn insert(&self, id: PointId, point: P) -> IndexResult<()>
pub fn insert(&self, id: PointId, point: P) -> IndexResult<()>
Insert a point. Acquires the write lock.
Trait Implementations§
Auto Trait Implementations§
impl<P, M> Freeze for ConcurrentHnsw<P, M>
impl<P, M> !RefUnwindSafe for ConcurrentHnsw<P, M>
impl<P, M> Send for ConcurrentHnsw<P, M>
impl<P, M> Sync for ConcurrentHnsw<P, M>
impl<P, M> Unpin for ConcurrentHnsw<P, M>
impl<P, M> UnsafeUnpin for ConcurrentHnsw<P, M>
impl<P, M> !UnwindSafe for ConcurrentHnsw<P, M>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more