pub trait SearchEmbedder: Send + Sync {
// Required methods
fn dims(&self) -> usize;
fn model_id(&self) -> &str;
fn is_local(&self) -> bool;
fn embed<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<f32>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Narrow embedding seam for the semantic message index. Core wraps its
registry-configured retrieval::Embedder behind this trait so the crate never
depends on the model registry (per-consumer embedder config is a RAG concern,
a later decomposition wave).
Required Methods§
Sourcefn dims(&self) -> usize
fn dims(&self) -> usize
The dimensionality this embedder produces (fixes the vec0 table width).
Sourcefn model_id(&self) -> &str
fn model_id(&self) -> &str
A stable identifier for the embedding model. Rows are tagged with it so a query embedded by a different model never matches an incomparable vector space.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".