Skip to main content

Module backend

Module backend 

Source
Expand description

Backend abstraction for the event store.

The EventStore trait keeps backends interchangeable: in-memory under simulation, redb in production, and any future swap (custom WAL, segmented log) without touching consumers. Backend-specific types (redb::Database, redb::Error) never appear in this trait surface.

Re-exports§

pub use memory::MemoryBackend;
pub use redb::RedbBackend;

Modules§

memory
In-memory EventStore backend used by writer and reader unit tests and by the cfg(madsim) simulation backend.
redb
redb-backed EventStore implementation.

Structs§

AppendEntry
One entry plus its sidecar index keys, as accepted by EventStore::append_batch.
IndexKey
A single sidecar index entry recorded atomically with an event store entry.

Enums§

IndexKind
The kind of secondary index the reader can look up.
ScanDirection
Direction for a sequence-keyed scan.

Traits§

EventStore
The single-node embedded event store.