pub struct SessionJournal {
pub version: u32,
pub program_checksum: u32,
pub seed: Option<u64>,
pub events: Vec<JournalEvent>,
pub truncated: bool,
pub checkpoint: Option<SaveState>,
}Expand description
One ordered log of every input that entered the VM during a session, plus a
terminal fast-restore checkpoint.
Serde-serializable; the canonical durable save artifact. Values serialize
tagged (via Value’s derived enum representation and
SaveState’s BTreeMap<String, Value>) — no lossy List/Divert → null
mapping. Deterministic: event order is insertion order; embedded maps are
BTreeMap.
Fields§
§version: u32Format version (see SESSION_JOURNAL_VERSION).
program_checksum: u32Checksum of the program this journal was recorded against, so replay can detect a recompile and decide fast-restore vs full replay.
seed: Option<u64>RNG seed applied at session start, if the host seeded one.
events: Vec<JournalEvent>Ordered inputs, in the order they entered the VM.
truncated: boolSet when the cap was hit or a divergence truncated the log.
checkpoint: Option<SaveState>Fast-restore: terminal game-state snapshot (ruling: embedded SaveState
in v1). Present once the session has produced state worth checkpointing.
Implementations§
Trait Implementations§
Source§impl Clone for SessionJournal
impl Clone for SessionJournal
Source§fn clone(&self) -> SessionJournal
fn clone(&self) -> SessionJournal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SessionJournal
impl Debug for SessionJournal
Source§impl<'de> Deserialize<'de> for SessionJournal
impl<'de> Deserialize<'de> for SessionJournal
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>,
Source§impl PartialEq for SessionJournal
impl PartialEq for SessionJournal
Source§fn eq(&self, other: &SessionJournal) -> bool
fn eq(&self, other: &SessionJournal) -> bool
self and other values to be equal, and is used by ==.