pub trait EmbeddingModel {
// Provided methods
fn dimensions(&self) -> usize { ... }
async fn embed(
&self,
_text: &str,
) -> Result<EmbeddingVector, EmbeddingError> { ... }
async fn embed_batch(
&self,
_texts: &[String],
) -> Result<Vec<EmbeddingVector>, EmbeddingError> { ... }
}Provided Methods§
fn dimensions(&self) -> usize
async fn embed(&self, _text: &str) -> Result<EmbeddingVector, EmbeddingError>
async fn embed_batch( &self, _texts: &[String], ) -> Result<Vec<EmbeddingVector>, EmbeddingError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.