pub struct Entry {
pub value: Bytes,
pub embedding: Option<Vec<f32>>,
pub importance: f32,
pub created_seq: u64,
pub last_access_seq: u64,
pub ttl_commits: Option<u64>,
pub meta: BTreeMap<String, String>,
}Expand description
One stored record.
value is opaque bytes; JSON is a convention, not a requirement. The two
sequence numbers are logical clock readings, never wall-clock time, so that
a replay of the same operations reproduces the same entries byte for byte
(DESIGN §3.6).
Fields§
§value: BytesThe opaque stored value.
embedding: Option<Vec<f32>>Optional vector for crate::Db::search. Fixed dimension per database.
importance: f32Retention weight in [0, 1]: how hard eviction tries to keep this.
created_seq: u64The branch sequence number at which this key was first written.
last_access_seq: u64The branch sequence number at which this entry was last written.
ttl_commits: Option<u64>Expiry measured in commits on the branch holding the entry.
meta: BTreeMap<String, String>Caller metadata. Ordered, so it encodes deterministically.
Implementations§
Source§impl Entry
impl Entry
Sourcepub fn content_eq(&self, other: &Entry) -> bool
pub fn content_eq(&self, other: &Entry) -> bool
Compare the caller-visible content of two entries.
The logical clock fields are deliberately excluded: two branches that
wrote the same value at different sequence numbers have not made
conflicting changes (DESIGN §4.2). So is WRITTEN_BY, for the same
reason: two writers storing the same value have not disagreed.