Skip to main content

Module value

Module value 

Source
Expand description

The view’s rules for reading a Json value: truth, order, and text.

There is deliberately no second value type here. Templates render whatever the rest of the framework already speaks — rustlavel_core::Json — so a query result or an API payload can go straight into a view without a conversion layer in between. What lives in this module is only the handful of decisions a template engine has to make on top of that model.

Functions§

compare
Ordering for <, <=, > and >=.
to_text
Render a value as the text {{ }} would emit, before escaping.
truthy
Whether a value counts as true for @if and &&/||.