Skip to main content

Module rules

Module rules 

Source
Expand description

Runs the rules: which rule applies to which node, and does the node pass? Mirrors matches, run_check and evaluate in reference/core.py and section 5 of the spec.

Structs§

Evaluation
Everything the rules found in a graph.
Ghost
A node that a failed require_link says should exist: “a link of this type to something of this type, in this plane”. The editor draws these as ghosts.
RuleResult
One rule applied to one node.

Enums§

Status
The outcome of one rule on one node.

Functions§

evaluate
Run every rule over the graph.
json_eq
JSON equality, the way the spec defines it: true is never 1, but 1 equals 1.0, and this holds inside lists and maps. serde_json’s own == would say 1 != 1.0.
unmatched_rules
Enabled rules that name specific nodes with id but match none of them: a typo looks exactly like success.