pub struct HnswIndex { /* private fields */ }
Implementations§
Source§impl HnswIndex
impl HnswIndex
pub async fn new( tx: &Transaction, ikb: IndexKeyBase, tb: String, p: &HnswParams, ) -> Result<Self, Error>
pub async fn index_document( &mut self, tx: &Transaction, id: Id, content: &[Value], ) -> Result<(), Error>
pub async fn check_state(&mut self, tx: &Transaction) -> Result<(), Error>
pub async fn knn_search( &self, tx: &Transaction, stk: &mut Stk, pt: &[Number], k: usize, ef: usize, chk: HnswConditionChecker<'_>, ) -> Result<VecDeque<(Arc<Thing>, f64, Option<Arc<Value>>)>, Error>
Auto Trait Implementations§
impl Freeze for HnswIndex
impl !RefUnwindSafe for HnswIndex
impl Send for HnswIndex
impl Sync for HnswIndex
impl Unpin for HnswIndex
impl UnwindSafe for HnswIndex
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more