pub trait Embedder: Send + Sync {
// Required methods
fn id(&self) -> &'static str;
fn dim(&self) -> usize;
fn model_name(&self) -> &str;
fn embed(&mut self, texts: &[String]) -> Result<Vec<Vec<f32>>>;
}Required Methods§
fn id(&self) -> &'static str
fn dim(&self) -> usize
fn model_name(&self) -> &str
fn embed(&mut self, texts: &[String]) -> Result<Vec<Vec<f32>>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl Embedder for DummyEmbedder
impl Embedder for FastEmbedder
Available on crate feature
fastembed only.