pub struct ExecutionLog {
pub thread_id: RunId,
pub step_id: Option<StepId>,
pub event_index: Seq,
pub event: Event,
pub state_hash: Option<[u8; 32]>,
}Expand description
One canonical execution log entry: thread (run), step, index, event, and optional state hash.
The event log is the source of truth. Checkpointing/snapshots are used only to speed up replay by providing initial state at a given seq; they do not replace the log.
Fields§
§thread_id: RunIdRun (thread) this entry belongs to.
step_id: Option<StepId>Step identifier when the event is associated with a step (e.g. from StateUpdated).
event_index: SeqMonotonic event index (sequence number) within the run.
event: EventThe event at this index.
state_hash: Option<[u8; 32]>Optional hash of state after applying this event (for verification/replay).
Implementations§
Source§impl ExecutionLog
impl ExecutionLog
Sourcepub fn from_sequenced(
thread_id: RunId,
se: &SequencedEvent,
state_hash: Option<[u8; 32]>,
) -> Self
pub fn from_sequenced( thread_id: RunId, se: &SequencedEvent, state_hash: Option<[u8; 32]>, ) -> Self
Builds an execution log entry from a sequenced event and run id.
state_hash is optional (e.g. when reading from store without reducer).
pub fn to_trace_event(&self) -> KernelTraceEvent
Trait Implementations§
Source§impl Clone for ExecutionLog
impl Clone for ExecutionLog
Source§fn clone(&self) -> ExecutionLog
fn clone(&self) -> ExecutionLog
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 ExecutionLog
impl Debug for ExecutionLog
Source§impl<'de> Deserialize<'de> for ExecutionLog
impl<'de> Deserialize<'de> for ExecutionLog
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 ExecutionLog
impl RefUnwindSafe for ExecutionLog
impl Send for ExecutionLog
impl Sync for ExecutionLog
impl Unpin for ExecutionLog
impl UnsafeUnpin for ExecutionLog
impl UnwindSafe for ExecutionLog
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