Skip to main content

made_core/ports/
ceremony_snapshot.rs

1use crate::entities::CeremonyInstance;
2use crate::value_objects::StreamVersion;
3
4/// A ceremony's state as folded from its stream up to `version`.
5///
6/// A snapshot is a cache of the fold, never the truth: loading a
7/// ceremony is the latest snapshot plus the events after its version,
8/// and dropping every snapshot changes nothing but speed.
9#[derive(Debug, Clone, PartialEq, Eq)]
10pub struct CeremonySnapshot {
11    pub version: StreamVersion,
12    pub instance: CeremonyInstance,
13}