Expand description
Deterministic-replay harness.
- Record mode: every
Record(JournalEntry)is appended to the in-memory journal. - Replay mode: the harness ignores fresh
Recordevents and instead exposes the previously-loaded journal viaReplay { sink, reply }. The harness pulls each entry off the snapshot and tellssinkto handle it. The sink is user-supplied so it can dispatch into the live actor system. - Off mode: drop everything.
Storage is an in-memory Vec<JournalEntry> by default. With the
replay cargo feature enabled, ReplayHarness::with_journal
attaches a [atomr_persistence::Journal] backend (e.g. the
in-memory InMemoryJournal from
atomr-persistence-query-inmemory for tests, or an SQL/Redis
provider in production). When attached, every Record round-trips
through the journal as a [PersistentRepr] and LoadFromJournal
pulls history back as JournalEntrys.
Structs§
Enums§
Traits§
- Replay
Sink - Trait the user implements to consume replayed entries. The actor
receives one
OnEntry { entry }message per replay event; the reply lets the harness pace the replay (next entry waits for the sink’s reply).
Functions§
- replay_
via_ sink - Convenience type-erased wrapper that bridges the typed
ReplaySinktrait to a closure-basedreplay_allcall.