pub trait HookContext: ReadonlyContext {
// Required methods
fn current_state(&self) -> &RunState;
fn snapshot(&self) -> RunSnapshot;
}Expand description
Context available to hooks observing the system.
Extends ReadonlyContext with the ability to inspect the current
run state and take a snapshot for later replay.
Required Methods§
Sourcefn current_state(&self) -> &RunState
fn current_state(&self) -> &RunState
Returns the current run state.
Sourcefn snapshot(&self) -> RunSnapshot
fn snapshot(&self) -> RunSnapshot
Returns a snapshot of the current run for audit/replay.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".