Skip to main content

TaskMemoryService

Trait TaskMemoryService 

Source
pub trait TaskMemoryService: Send + Sync {
    // Required methods
    fn project<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn ingest<'life0, 'async_trait>(
        &'life0 self,
        effect_id: String,
        turn: u64,
        user: String,
    ) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
    fn remember<'life0, 'async_trait>(
        &'life0 self,
        effect_id: String,
        turn: u64,
        note: String,
    ) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}
Expand description

Memory operations bound to a trusted session subject and declared task slots. Ingestion and remember are accepted effects. Cancellation after execution starts cannot undo storage; returned slot projections still require current ownership. Each result is a complete projection: omitted or null slots remove a previous memory-owned value, while explicit inputs and accepted local changes remain.

Required Methods§

Source

fn project<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Read declared slot projections without ingesting or persisting new data.

Source

fn ingest<'life0, 'async_trait>( &'life0 self, effect_id: String, turn: u64, user: String, ) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Ingest an accepted user turn. The effect ID is stable for deduplication.

Source

fn remember<'life0, 'async_trait>( &'life0 self, effect_id: String, turn: u64, note: String, ) -> Pin<Box<dyn Future<Output = Result<Value, String>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Remember an accepted note, then return declared slot projections.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§