Expand description
Event sourcing, durable state, and CQRS persistence for Datum.
The crate provides byte-oriented storage SPIs for event journals, snapshots,
and durable state, together with a conformant in-memory reference backend.
Serialization is synchronous and selected explicitly through a per-type
SerializerCatalog; the optional default protobuf feature supplies
ProstSerializer without exposing protobuf types in the
feature-independent façade.
Re-exports§
pub use backend::MemoryDurableStateStore;pub use backend::MemoryJournal;pub use backend::MemorySnapshotStore;pub use testkit::FailingJournal;pub use testkit::assert_durable_state_store_conformance;pub use testkit::assert_journal_conformance;pub use testkit::assert_snapshot_store_conformance;
Modules§
- backend
- First-party persistence storage backends.
- projection
- Managed read-side projection runtime, configuration, and storage contracts.
- query
- Persistence Query capability traits and Datum stream adapters.
- state
- Durable-state behavior blueprints, effects, recovery, and runtime handles.
- testkit
- Public conformance suite for persistence storage backends.
Structs§
- Atomic
Write - A non-empty, gapless sequence of events committed all-or-nothing.
- Effect
- A command decision for an
EventSourcedBehavior. - Event
Sourced Behavior - Immutable, side-effect-free event-sourced behavior blueprint.
- Event
Sourced Handle - Spawned event-sourced behavior handle.
- Event
Sourced Message - A message accepted by an event-sourced behavior’s single ordered ingress.
- Event
Sourced Runtime - Runtime resources supplied only when a behavior is spawned.
- Event
Sourced State - A point-in-time state and sequence-number observation.
- Identity
Adapter - Identity event/state adapter for cases where domain and journal types match.
- Persistence
Id - Stable identity of one persistent entity.
- Prost
Serializer - Protobuf serializer for hand-written
prost::Messagejournal types. - Published
Event - A confirmed domain-typed event published by a running behavior.
- Replay
Range - Inclusive replay selection for one persistence id.
- Reply
Effect - An effect that statically records either a reply or an explicit no-reply decision.
- Revision
- Monotonic revision of one durable-state value.
- Selected
Snapshot - Snapshot metadata paired with its serialized state frame.
- Sequence
Nr - Monotonic event sequence number for one persistence id.
- Serialized
Payload - Durable serialized value stored by persistence backends.
- Serializer
Catalog - Per-journal-type registry with one primary encoder and id-based decoders.
- Serializer
Id - Stable serializer identifier stored with every serialized payload.
- Snapshot
Criteria - Inclusive sequence-number and timestamp bounds for snapshot selection.
- Snapshot
Metadata - Durable identity and timestamp of one saved snapshot.
- Stored
Event - One serialized event as stored by a journal backend.
- Tag
- Tag attached to a stored event or durable-state change for querying.
- Versioned
State - Latest serialized durable state together with its CAS revision.
Enums§
- Append
Outcome - Result of one input
crate::AtomicWritein a journal append batch. - Event
Sourced Signal - Persistence-specific lifecycle and maintenance signals.
- Persistence
Error - Errors produced by persistence operations.
- Recovery
- Recovery mode for an event-sourced behavior.
- Retention
Criteria - Count-based snapshot retention policy.
- Snapshot
Selection - Snapshot selection used during recovery.
Constants§
- DEFAULT_
PERSISTENCE_ ID_ SEPARATOR - Default separator between the entity type and entity id.
Traits§
- Durable
State Store - Byte-oriented durable-state storage provider.
- Event
Adapter - Converts domain events to and from their journal representation.
- Into
Event Handler Result - Converts an event-handler return value into a persistence result.
- Journal
- Byte-oriented event journal storage provider.
- Persistence
Serializer - Synchronous serializer for one journal representation type.
- Snapshot
Store - Byte-oriented snapshot storage provider.
- State
Adapter - Converts domain state to and from its snapshot or durable-state representation.
Type Aliases§
- Event
Stream - Owned asynchronous stream returned by journal replay.
- Persistence
Result - Result type used by
datum-persistence.