pub struct EmbedderIdentity {
pub name: String,
pub dimensions: usize,
pub normalize: bool,
}Expand description
Describe an embedder’s observable identity. Used both in-memory on
an open [Mnemo] handle and persisted at metadata.embedder on the
scaffold manifest so that reopening with a different embedder is
caught at set_embedder time instead of silently polluting the
index.
Fields§
§name: StringModel identifier the caller chose. Convention: a short, stable
slug — "all-MiniLM-L6-v2", "text-embedding-3-small".
dimensions: usizeVector width this embedder emits. Validated against
[Mnemo::dimensions] on registration.
normalize: boolWhether the embedder returns unit-normalized vectors. Caller’s claim — mnemo doesn’t verify it, but records it on the manifest so downstream readers can tell whether a dot product is cosine equivalent.
Implementations§
Source§impl EmbedderIdentity
impl EmbedderIdentity
Sourcepub const MISMATCH_MSG: &'static str = "embedder identity mismatch"
pub const MISMATCH_MSG: &'static str = "embedder identity mismatch"
Message rendered inside MnemoError::Invalid on an identity
mismatch. Public so tests + binding layers can assert on it.