pub trait NoteSearchAnnProvider: Send + Sync {
// Required methods
fn backend_id(&self) -> &str;
fn serves_backend(&self, runtime: &KhiveRuntime) -> bool;
fn search<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
token: &'life1 NamespaceToken,
model: &'life2 str,
query_embedding: &'life3 [f32],
top_k: u32,
) -> Pin<Box<dyn Future<Output = RuntimeResult<Option<Vec<VectorSearchHit>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
An installed graph candidate source for one database backend.
None means this model has no graph this consumer may serve and licenses the
existing exact sqlite-vec fallback. Errors propagate rather than silently
changing route. Implementations merge the registered consumer’s fresh tail
before returning candidates.
Required Methods§
Sourcefn backend_id(&self) -> &str
fn backend_id(&self) -> &str
Backend identity whose note vectors the graph indexes.
Sourcefn serves_backend(&self, runtime: &KhiveRuntime) -> bool
fn serves_backend(&self, runtime: &KhiveRuntime) -> bool
Match the actual opened backend, not only its logical name. Two
independently opened databases may both have the default main ID.
Sourcefn search<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
token: &'life1 NamespaceToken,
model: &'life2 str,
query_embedding: &'life3 [f32],
top_k: u32,
) -> Pin<Box<dyn Future<Output = RuntimeResult<Option<Vec<VectorSearchHit>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn search<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
token: &'life1 NamespaceToken,
model: &'life2 str,
query_embedding: &'life3 [f32],
top_k: u32,
) -> Pin<Box<dyn Future<Output = RuntimeResult<Option<Vec<VectorSearchHit>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Return ANN plus fresh-tail candidates in the same score and ordering
contract as VectorStore::search.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".