pub struct HashEmbedder {
pub dims: usize,
}Expand description
Deterministic, dependency-free embedder for tests, examples, and embeddings-less deployments.
Hashes the text into a fixed-dimension L2-normalized vector: no
semantics, but consistent geometry — the same text always yields the
same vector, so dedup and round-trip assertions work without a model.
Not for production: similarity between different texts is noise.
Model id is hash-embedder (embedding provenance still detects it).
Fields§
§dims: usizeVector dimensionality (default DEFAULT_EMBEDDING_DIM).
Trait Implementations§
Source§impl Clone for HashEmbedder
impl Clone for HashEmbedder
Source§fn clone(&self) -> HashEmbedder
fn clone(&self) -> HashEmbedder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HashEmbedder
impl Debug for HashEmbedder
Source§impl Default for HashEmbedder
impl Default for HashEmbedder
Source§impl Embedder for HashEmbedder
impl Embedder for HashEmbedder
Source§fn model_id(&self) -> &str
fn model_id(&self) -> &str
The model id that produced these embeddings (e.g.
sentence-transformers/all-MiniLM-L6-v2@main). Used for
embedding provenance (D10): memories stamp the model that
embedded them, so a model swap is detectable and a re-embed pass
can be triggered rather than silently producing incomparable
vectors. Default "unknown" for backends that don’t track it.Auto Trait Implementations§
impl Freeze for HashEmbedder
impl RefUnwindSafe for HashEmbedder
impl Send for HashEmbedder
impl Sync for HashEmbedder
impl Unpin for HashEmbedder
impl UnsafeUnpin for HashEmbedder
impl UnwindSafe for HashEmbedder
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