pub struct MemoryRelation { /* private fields */ }Expand description
Why one remembered thing led to another.
This is not an entry with a link attached. The relation is the reason: an entry says what was decided or seen, and only the edges say how one thing came from another. A memory of nothing but entries can be read but not followed, and following is how a later session works out how and why something was done.
So why is not optional. A relation without one asserts that two
things are connected while declining to say how, which is the shape
of a guess written down as a fact.
Implementations§
Source§impl MemoryRelation
impl MemoryRelation
Sourcepub fn new(
from: MemoryEntryId,
to: MemoryEntryId,
kind: MemoryRelationKind,
why: impl Into<String>,
confidence: MemoryConfidence,
) -> Result<Self, DomainError>
pub fn new( from: MemoryEntryId, to: MemoryEntryId, kind: MemoryRelationKind, why: impl Into<String>, confidence: MemoryConfidence, ) -> Result<Self, DomainError>
Relate from to to, saying how and how sure.
The endpoints need not both be written by the same call. An ending explains a decision taken an hour earlier, and a session that could only relate what it wrote in one breath could never record that. What it may not do is relate an entry to itself: nothing explains itself, and an edge that says so is a cycle a reader will follow forever.
pub fn from(&self) -> &MemoryEntryId
pub fn to(&self) -> &MemoryEntryId
pub const fn kind(&self) -> MemoryRelationKind
pub const fn confidence(&self) -> MemoryConfidence
Trait Implementations§
Source§impl Clone for MemoryRelation
impl Clone for MemoryRelation
Source§fn clone(&self) -> MemoryRelation
fn clone(&self) -> MemoryRelation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more