pub struct SparseEntry {
pub vocab_id: String,
pub sparse: SparseEmbed,
}Expand description
One (vocab_id, SparseEmbed) pair inside a SparseBucket.
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§
§vocab_id: StringVocabulary identifier. Conventionally a short string identifying
the encoder and vocab (e.g. "bge-m3", "opensearch-distill-v3").
The bucket indexes on this exact string for get / upsert / remove.
sparse: SparseEmbedThe sparse embedding produced by the encoder. Contains indices
(token ids) and values (non-zero weights) alongside vocab_id.
Trait Implementations§
Source§impl Clone for SparseEntry
impl Clone for SparseEntry
Source§fn clone(&self) -> SparseEntry
fn clone(&self) -> SparseEntry
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 SparseEntry
impl Debug for SparseEntry
Source§impl<'de> Deserialize<'de> for SparseEntry
impl<'de> Deserialize<'de> for SparseEntry
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SparseEntry
impl RefUnwindSafe for SparseEntry
impl Send for SparseEntry
impl Sync for SparseEntry
impl Unpin for SparseEntry
impl UnsafeUnpin for SparseEntry
impl UnwindSafe for SparseEntry
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