JournalSink

Trait JournalSink 

pub trait JournalSink: Send + Sync {
    // Required method
    fn write(&self, m: &StateMutation);
}
Expand description

Synchronous, durable sink for state mutations.

The in-memory mutation journal is a bounded ring (1024 entries) — long sessions lose history. A JournalSink receives every mutation as it is recorded so it can be persisted in full.

write runs on the state-write hot path (under the journal lock): it must be cheap, must not await, and must not panic — implementations log internal errors instead of surfacing them.

Required Methods§

fn write(&self, m: &StateMutation)

Persist one mutation. Must not panic; log errors internally.

Implementors§