pub struct StepEntry<S: Clone> {
pub step_id: u64,
pub timestamp: SimTime,
pub rng_state_before: [u8; 32],
pub rng_state_after: [u8; 32],
pub input_state: S,
pub output_state: S,
pub equation_evaluations: Vec<EquationEval>,
pub decisions: Vec<Decision>,
pub step_type: String,
pub compute_duration_us: u64,
}Expand description
Complete step entry for audit logging (EDD-16).
Every step MUST include all required fields for full reproducibility and verification.
Fields§
§step_id: u64Monotonic step counter
timestamp: SimTimeSimulation time at this step
rng_state_before: [u8; 32]Blake3 hash of RNG state BEFORE this step
rng_state_after: [u8; 32]Blake3 hash of RNG state AFTER this step
input_state: SState snapshot before step (for replay verification)
output_state: SState snapshot after step
equation_evaluations: Vec<EquationEval>All equation evaluations performed in this step
decisions: Vec<Decision>All decisions made in this step
step_type: StringStep type identifier (simulation-specific)
compute_duration_us: u64Duration of step computation (for profiling)
Implementations§
Source§impl<S: Clone + Serialize> StepEntry<S>
impl<S: Clone + Serialize> StepEntry<S>
Sourcepub fn new(
step_id: u64,
timestamp: SimTime,
step_type: impl Into<String>,
input_state: S,
output_state: S,
) -> Self
pub fn new( step_id: u64, timestamp: SimTime, step_type: impl Into<String>, input_state: S, output_state: S, ) -> Self
Create a new step entry.
Sourcepub fn add_equation_eval(&mut self, eval: EquationEval)
pub fn add_equation_eval(&mut self, eval: EquationEval)
Add an equation evaluation.
Sourcepub fn add_decision(&mut self, decision: Decision)
pub fn add_decision(&mut self, decision: Decision)
Add a decision.
Sourcepub fn with_duration(self, duration_us: u64) -> Self
pub fn with_duration(self, duration_us: u64) -> Self
Set compute duration.
Trait Implementations§
Source§impl<'de, S> Deserialize<'de> for StepEntry<S>where
S: Deserialize<'de> + Clone,
impl<'de, S> Deserialize<'de> for StepEntry<S>where
S: Deserialize<'de> + Clone,
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<S> Freeze for StepEntry<S>where
S: Freeze,
impl<S> RefUnwindSafe for StepEntry<S>where
S: RefUnwindSafe,
impl<S> Send for StepEntry<S>where
S: Send,
impl<S> Sync for StepEntry<S>where
S: Sync,
impl<S> Unpin for StepEntry<S>where
S: Unpin,
impl<S> UnsafeUnpin for StepEntry<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for StepEntry<S>where
S: UnwindSafe,
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