pub trait RetrievalBackend: Send + Sync {
// Required method
fn search_one<'life0, 'life1, 'async_trait>(
&'life0 self,
sub_query: &'life1 str,
limit: usize,
min_score: f32,
) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeMatch>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Executes a single sub-query search against whatever backs actual retrieval (embedding + vector/graph search). Implemented by callers — this crate has no opinion on persistence or embedding models.
Required Methods§
Sourcefn search_one<'life0, 'life1, 'async_trait>(
&'life0 self,
sub_query: &'life1 str,
limit: usize,
min_score: f32,
) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeMatch>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn search_one<'life0, 'life1, 'async_trait>(
&'life0 self,
sub_query: &'life1 str,
limit: usize,
min_score: f32,
) -> Pin<Box<dyn Future<Output = Result<Vec<KnowledgeMatch>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Run one search for sub_query and return scored matches.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".