Skip to main content

Module snapshot

Module snapshot 

Source
Expand description

§Snapshot Module

A snapshot captures an aggregate’s fully-folded state at a known version so the next load can resume from there instead of replaying the entire stream. Without it, CommandBus::dispatch reads every event for an aggregate on each command — a long-lived aggregate with hundreds of events pays that cost on every operation. The serialized state is opaque to the store: only the owning aggregate knows how to read it back via Aggregate::from_snapshot.

Structs§

Snapshot
A point-in-time capture of an aggregate’s state.