Skip to main content

HookContext

Trait HookContext 

Source
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§

Source

fn current_state(&self) -> &RunState

Returns the current run state.

Source

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".

Implementors§