Expand description
UI-6: the template’s expressions — Rhai, over the scope: the props by
name, state, each live collection by name ({ rows, status }), and
each {#each}’s variable. An expression is compiled once; what it reads
is found by scanning its text (Reads), so a binding reads (and so
tracks) only the state keys and names it names.
Structs§
Functions§
- as_text
- A value drawn as text: a string as it is, unit as nothing, anything else as Rhai prints it.
- compiles
- FRAME-17: how many times an expression went through Rhai’s compiler on this thread (the tests read it).
- engine
- The expressions’ engine (one per thread: the page has one).
- path_of
textas a path —nameorname.field…, each an identifier and the first no Rhai word — or none.- scan
- The names and
state.<key>s intext, string literals skipped. - to_
dynamic - A JSON value as Rhai’s.
- to_
value - Rhai’s value as JSON.
- truthy
- A value as a condition: a bool as it is; unit false; anything else true.
- walk
- The value at
path(fields after the first) insidev: null where a field is missing, as Rhai reads a map’s missing property.