pub struct Snapshot {
pub aggregate_id: String,
pub aggregate_type: String,
pub version: i64,
pub state: Value,
pub created_at: u64,
}Expand description
A point-in-time capture of an aggregate’s state.
§Fields
aggregate_id: instance the snapshot belongs toaggregate_type: type name (e.g., “User”), mirrorsEvent::aggregate_typeversion: sequence of the last event folded intostate; a loader replays events fromversion + 1onwardstate: aggregate state serialized byAggregate::to_snapshot, opaque herecreated_at: wall-clock capture time (milliseconds since UNIX epoch, same unit asEvent::timestamp)
Fields§
§aggregate_id: String§aggregate_type: String§version: i64§state: Value§created_at: u64Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Snapshot
impl<'de> Deserialize<'de> for Snapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Snapshot
Auto Trait Implementations§
impl Freeze for Snapshot
impl RefUnwindSafe for Snapshot
impl Send for Snapshot
impl Sync for Snapshot
impl Unpin for Snapshot
impl UnsafeUnpin for Snapshot
impl UnwindSafe for Snapshot
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more