pub struct SessionState {
pub rng_seed: u64,
pub period_cursor: usize,
pub balance_state: BalanceState,
pub document_id_state: DocumentIdState,
pub entity_counts: EntityCounts,
pub generation_log: Vec<PeriodLog>,
pub config_hash: String,
}Expand description
Accumulated state for a multi-period generation session.
This struct is serializable so it can be checkpointed to disk and resumed later (e.g. after a crash or for incremental generation).
Fields§
§rng_seed: u64Master RNG seed for the entire run.
period_cursor: usizeIndex of the next period to generate (0 = fresh run).
balance_state: BalanceStateGL and sub-ledger balances carried forward.
document_id_state: DocumentIdStateNext sequential document IDs.
entity_counts: EntityCountsCounts of master data entities generated so far.
generation_log: Vec<PeriodLog>Per-period generation log (one entry per completed period).
config_hash: StringSHA-256 hash of the config that created this session, used to detect config drift on resume.
Implementations§
Trait Implementations§
Source§impl Clone for SessionState
impl Clone for SessionState
Source§fn clone(&self) -> SessionState
fn clone(&self) -> SessionState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SessionState
impl Debug for SessionState
Source§impl<'de> Deserialize<'de> for SessionState
impl<'de> Deserialize<'de> for SessionState
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
Auto Trait Implementations§
impl Freeze for SessionState
impl RefUnwindSafe for SessionState
impl Send for SessionState
impl Sync for SessionState
impl Unpin for SessionState
impl UnsafeUnpin for SessionState
impl UnwindSafe for SessionState
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