pub struct EmbeddingEntry {
pub model: String,
pub embedding: Embedding,
}Expand description
One (model, Embedding) pair inside an EmbeddingBucket.
Kept as a separate type rather than a tuple so future schema bumps can add per-entry fields (provenance, deprecation, signature) under the same canonical-form contract every other mnem object uses.
Fields§
§model: StringEmbedder identifier. Conventionally "<provider>:<model>"
(matches the model string inside Embedding); the bucket
indexes on this exact string for get / upsert / remove.
embedding: EmbeddingThe embedding vector and dim/dtype metadata. Its own
validate() invariant (vector.len() == dim * dtype.byte_width())
is enforced where embeddings are constructed; the bucket does
not re-validate on decode (cheap-decode contract). Untrusted
callers (HTTP / MCP / replication) are expected to call
Embedding::validate() themselves before storing.
Trait Implementations§
Source§impl Clone for EmbeddingEntry
impl Clone for EmbeddingEntry
Source§fn clone(&self) -> EmbeddingEntry
fn clone(&self) -> EmbeddingEntry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more