Skip to main content

Module execute

Module execute 

Source
Expand description

The executor — port of execute.ts / Execute.java, on the full-replacement state model. Handlers are invoked via boxed closures (no reflection); panics are caught (the AssertionError/Throwable parity channel); Future returns are driven by a small std block_on. State is a Value, replaced wholesale by each stimulus.

Structs§

ExecutePorts
The ports collect_examples/execute_plan need. create_context maps a step-file to its fresh initial state (None → a unit state per file); observer is optional per-step instrumentation. The lifetime lets the port closures borrow caller locals (e.g. a conformance observer’s accumulator).
QueuedExample
One runnable example: its name and a callback that runs its steps.
StepObservation
One executed step’s outcome. example_index is 0-based; ordinal is 1-based.

Enums§

StepOutcome
A step’s outcome in the conformance trace.

Functions§

collect_examples
Reports every diagnostic in plan, then returns one QueuedExample per planned example, in document order (each run is lazy). Port of collectExamples.
execute_plan
Runs every example in plan, in order, stopping at the first failure. Port of executePlan.

Type Aliases§

ContextFactory
Maps a step-file to its fresh initial state.
Observer
Per-step instrumentation (conformance trace mode).
Reporter
Receives every diagnostic collected during planning.