pub trait QueryLabelProvider<V: VectorId>:
Debug
+ Send
+ Sync {
// Required method
fn is_match(&self, vec_id: V) -> bool;
// Provided method
fn on_visit(&self, neighbor: Neighbor<V>) -> QueryVisitDecision<V> { ... }
}Required Methods§
Provided Methods§
Sourcefn on_visit(&self, neighbor: Neighbor<V>) -> QueryVisitDecision<V>
fn on_visit(&self, neighbor: Neighbor<V>) -> QueryVisitDecision<V>
Inspect a candidate before it is inserted into the frontier.
Implementations can tweak the distance, reject the candidate, or
request early termination. The default implementation accepts if
is_match returns true, rejects otherwise.