pub trait MemoryEmbedder: Send + Sync {
// Required method
fn embed(&self, text: &str) -> Vec<f32>;
}Expand description
A text embedder. Backends SHOULD return a unit-normalized vector; an empty vec means “no embedding available” (recall falls back to pure BM25 for that item/query). Must be cheap enough to call once per query at recall time (document vectors are precomputed at write/index time).
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".