1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! `varar-core` — the pure functional core of var, ported from the Java module
//! `dev.varar.core`: parse → match → plan → execute, diffs, drift/hash,
//! canonical JSON, and the conformance projections. No filesystem, network,
//! time, or test-framework dependencies.
//!
//! The sealed Java interfaces (`Block`, `TableOrFence`, `ResolvedSteps`) become
//! Rust enums; the exception hierarchy becomes [`error::StepError`]/`Result`;
//! `Object` duck-typing becomes [`value::Value`]; reflective handler invocation
//! becomes boxed closures ([`handler::Handler`]).
// `StepFailure` carries the full diff payload the tests consume by value
// (`run().unwrap_err().error`); boxing it would change that public surface.
// Nested `if`/`if let` blocks mirror the Java control flow faithfully; stable
// Rust has no `let`-chains to collapse the `if let` cases into.
// Declared exception to "no globals in the core": `execute::install_hook`
// registers a Once-guarded, thread-local-gated process panic hook — the only
// way to silence stderr for the panics `catch_unwind` deliberately catches
// (the AssertionError parity channel). See its doc comment for the guarantees.