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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EmbeddingEntry
impl Debug for EmbeddingEntry
Source§impl<'de> Deserialize<'de> for EmbeddingEntry
impl<'de> Deserialize<'de> for EmbeddingEntry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for EmbeddingEntry
impl PartialEq for EmbeddingEntry
Source§fn eq(&self, other: &EmbeddingEntry) -> bool
fn eq(&self, other: &EmbeddingEntry) -> bool
self and other values to be equal, and is used by ==.