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