Module value

Module value 

Source
Expand description

JSON serde_json::Value to display string for template output.

Also defines internal runtime markers: Nunjucks-style safe strings (RJ_SAFE) and undefined (RJ_UNDEFINED) for lookup and default filter parity.

Constants§

RJ_REGEXP
Object marker for r/…/… regex literals (.test(string) in crate::renderer).
RJ_SAFE
Object key for HTML-safe output: not re-escaped when crate::Environment::autoescape is on.
RJ_UNDEFINED
Sentinel for “JavaScript undefined” (distinct from JSON null). Used when a name is not bound in context or globals, and for default filter two-argument semantics.

Functions§

is_marked_safe
true if v is a mark_safe wrapper.
is_regexp_value
true if v is a regex literal value (r/…/…).
is_undefined_value
true if v is the internal undefined sentinel (undefined_value).
mark_safe
Wrap a string so autoescape does not re-encode it (Nunjucks markSafe).
regexp_pattern_flags
Pattern and flags strings for is_regexp_value objects.
undefined_value
Nunjucks undefined-like value for unbound names.
value_to_string
value_to_string_raw
Raw string content for escaping (unwraps safe; undefined → empty).