pub struct MockEmbeddingProvider { /* private fields */ }Expand description
Deterministic mock embedding provider using SHA-256 hashing.
Produces normalized vectors where identical text always yields identical embeddings. Different text yields uncorrelated embeddings. No semantic similarity — purely structural; use a real provider for semantic quality.
Implementations§
Trait Implementations§
Source§impl EmbeddingProvider for MockEmbeddingProvider
impl EmbeddingProvider for MockEmbeddingProvider
fn dimensions(&self) -> usize
fn embed(&self, text: &str) -> Result<Embedding, EmbeddingError>
fn embed_batch(&self, texts: &[&str]) -> Result<Vec<Embedding>, EmbeddingError>
Auto Trait Implementations§
impl Freeze for MockEmbeddingProvider
impl RefUnwindSafe for MockEmbeddingProvider
impl Send for MockEmbeddingProvider
impl Sync for MockEmbeddingProvider
impl Unpin for MockEmbeddingProvider
impl UnsafeUnpin for MockEmbeddingProvider
impl UnwindSafe for MockEmbeddingProvider
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more