pub trait MemoryReaderPort: Send + Sync {
// Required methods
fn recall<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 MemoryScope,
) -> Pin<Box<dyn Future<Output = Result<MemoryRecollection, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn ask<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: &'life1 MemoryScope,
question: &'life2 MemoryQuestion,
) -> Pin<Box<dyn Future<Output = Result<MemoryRecollection, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn as_known_at<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 MemoryScope,
moment: MemoryMoment,
) -> Pin<Box<dyn Future<Output = Result<MemoryRecollection, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn follow<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
scope: &'life1 MemoryScope,
from: &'life2 MemoryEntryId,
to: &'life3 MemoryEntryId,
) -> Pin<Box<dyn Future<Output = Result<MemoryRecollection, DomainError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn capabilities(&self) -> MemoryCapabilities;
}Expand description
Reading what earlier sessions learned, and why.
Three ways of asking, because three different questions get asked: what is known about this at all, what does memory say about one thing in particular, and what was known at a moment. The third is not the first two filtered by date — it excludes what was learned later about earlier events, which is the whole point of asking it.
Required Methods§
Sourcefn recall<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 MemoryScope,
) -> Pin<Box<dyn Future<Output = Result<MemoryRecollection, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn recall<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 MemoryScope,
) -> Pin<Box<dyn Future<Output = Result<MemoryRecollection, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Everything memory holds about scope.
Sourcefn ask<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: &'life1 MemoryScope,
question: &'life2 MemoryQuestion,
) -> Pin<Box<dyn Future<Output = Result<MemoryRecollection, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn ask<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
scope: &'life1 MemoryScope,
question: &'life2 MemoryQuestion,
) -> Pin<Box<dyn Future<Output = Result<MemoryRecollection, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
What memory says in answer to a question put in words.
Sourcefn as_known_at<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 MemoryScope,
moment: MemoryMoment,
) -> Pin<Box<dyn Future<Output = Result<MemoryRecollection, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn as_known_at<'life0, 'life1, 'async_trait>(
&'life0 self,
scope: &'life1 MemoryScope,
moment: MemoryMoment,
) -> Pin<Box<dyn Future<Output = Result<MemoryRecollection, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
What was known about scope at moment.
Sourcefn follow<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
scope: &'life1 MemoryScope,
from: &'life2 MemoryEntryId,
to: &'life3 MemoryEntryId,
) -> Pin<Box<dyn Future<Output = Result<MemoryRecollection, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn follow<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
scope: &'life1 MemoryScope,
from: &'life2 MemoryEntryId,
to: &'life3 MemoryEntryId,
) -> Pin<Box<dyn Future<Output = Result<MemoryRecollection, DomainError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
The chain of reasons leading from from back to to.
The question the whole contract exists to answer, and the only one whose failure means the memory has stopped being worth keeping: everything else can be reconstructed by reading, and this cannot.
It answers with the reasons and not with the prose — the edges
on the path, in the order they connect. What each end says is
what recall is for, and a backend that padded the chain with
text would make two contracts out of one.
An empty chain is a real answer: the two are not connected by anything anyone wrote down.
fn capabilities(&self) -> MemoryCapabilities
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".