MemoryEventLog

Trait MemoryEventLog 

Source
pub trait MemoryEventLog: Send + Sync {
    // Required methods
    fn append<'life0, 'async_trait>(
        &'life0 self,
        envelope: MemoryEventEnvelope,
    ) -> Pin<Box<dyn Future<Output = Result<(), MemoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn replay_session<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 SessionId,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEventEnvelope>, MemoryError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

A durable append-only sink for memory events.

The live session worker awaits acceptance here — not extraction, not reconciliation. That is the only point where the engine may tell a user their correction was durably recorded.

Required Methods§

Source

fn append<'life0, 'async_trait>( &'life0 self, envelope: MemoryEventEnvelope, ) -> Pin<Box<dyn Future<Output = Result<(), MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Append an envelope, returning once it is durable.

Source

fn replay_session<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 SessionId, ) -> Pin<Box<dyn Future<Output = Result<Vec<MemoryEventEnvelope>, MemoryError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Read back every event for a logical session, in append order.

Implementors§