Skip to main content

Module vars

Module vars 

Source
Expand description

Typed section variables and their deterministic rendering rules (PSP-10 system 23).

There is no template language: the entire dynamic surface of a section body is {{variable}} substitution under these rules. Bounds are enforced at construction, so a value that exists is a value that fits. The trusted/untrusted distinction is explicit in the type: BoundedText is locally trusted prose, ObservationText is untrusted material rendered inside a delimited, length-prefixed block that cannot change section structure.

Structs§

BoundedList
A list bounded in item count and per-item bytes at construction.
BoundedText
Locally trusted text with a construction-enforced byte bound.
ObservationText
Untrusted text. Rendered only inside a canonical observation block whose escaping prevents the value from forging block structure; the byte count in the header is of the escaped content.

Enums§

ListStyle
Declared rendering style for a list variable (section front matter).
VarValue
A validated variable value at substitution time. Bounds were enforced by the typed constructors; this enum is what the renderer consumes.