pub trait Embedder: Send + Sync {
// Required methods
fn embed(&self, text: &str) -> Result<Vec<f32>>;
fn name(&self) -> &str;
}Expand description
Anything that can turn text into a vector.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".