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§
Trait Implementations§
impl StructuralPartialEq for Entry
Auto Trait Implementations§
impl !Freeze for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnsafeUnpin for Entry
impl UnwindSafe for Entry
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