pub struct MemoryRecord {
pub id: i64,
pub scope: String,
pub kind: MemoryKind,
pub anchor: Option<MemoryAnchor>,
pub anchor_state: AnchorState,
pub applies: bool,
pub body: String,
pub confidence: Option<f64>,
pub tree: Option<String>,
pub created_at: String,
pub superseded_by: Option<i64>,
pub superseded_at: Option<String>,
}Expand description
One stored memory record.
Fields§
§id: i64The monotonic generation and identity. AUTOINCREMENT, so an id is never
reused after a crate::Store::forget_memory.
scope: StringThe recorded namespace — which repo or project this belongs to. Not a
branch label; see DEFAULT_MEMORY_SCOPE.
kind: MemoryKindWhat kind of knowledge this is.
anchor: Option<MemoryAnchor>Where it is anchored, if anywhere.
anchor_state: AnchorStateWhat that anchor is worth against the current graph. Computed on read; no column holds it.
applies: boolWhether this record applies to the tree it was just read against —
AnchorState::applies for the state above, surfaced as its own field so
a programmatic consumer gets the scope rule without having to re-implement
it from the state token.
Like anchor_state, computed on every read and stored in no column. A
false here is never a reason to delete anything: the record still applies
wherever its anchor does resolve.
body: StringThe prose. Unredacted by construction — see the module docs on privacy.
confidence: Option<f64>The writer’s own confidence, when it offered one. Not the score an
inferred edge carries, and never readable as one: no memory record is a
graph fact.
tree: Option<String>The sync_state tree id when the record was written — the repo-state
witness, so a reader can tell which state of the world the writer saw.
created_at: StringSQLite’s datetime('now') at write time. Written for humans and never
read, exactly as imports.imported_at is; no ordering or policy depends
on it.
superseded_by: Option<i64>The record that overruled this one, if any. Live listing excludes any record with a successor, immediately and regardless of age.
superseded_at: Option<String>When that happened. Display only, on the same terms as created_at.
Implementations§
Trait Implementations§
Source§impl Clone for MemoryRecord
impl Clone for MemoryRecord
Source§fn clone(&self) -> MemoryRecord
fn clone(&self) -> MemoryRecord
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more