Skip to main content

Module condition_map

Module condition_map 

Source
Expand description

Condition-map resolver (expressions.md §8). A thin wrapper over the expression engine — NOT a separate parser.

A condition map is an ordered {expr: value, …}. Keys (each an §2 expression) are evaluated in declaration order; the first truthy key’s value wins. On a miss the literal true key’s value is used if present, else null. Declaration order must be preserved by the caller’s map type (serde_json::Map with preserve_order, or an ordered key list).

The true default key is the literal expression true (always truthy); R4 forbids convention sigils such as _. The map’s value is returned verbatim (boolean | string | number | null) — the call site decides the expected type.

Constants§

DEFAULT_KEY
The default (else) key: the literal expression true.

Functions§

resolve
Resolve a condition map against form data.