Expand description

The tera templating engine library, reexported.

Tera

Tera is a template engine based on Jinja2 and the Django template language.

See the site for features and to get started.

Modules

  • The AST of Tera
  • Re-export some helper fns useful to write filters/fns/tests

Macros

  • Helper macro to get real values out of Value while retaining proper errors in filters

Structs

  • The struct that holds the context of a template rendering.
  • The Error type
  • Represents a JSON key/value type.
  • Represents a JSON number, whether integer or floating point.
  • This is the parsed equivalent of a template file. It also does some pre-processing to ensure it does as little as possible at runtime Not meant to be used directly.
  • The main point of interaction in this library.

Enums

  • The kind of an error (non-exhaustive)
  • Represents any valid JSON value.

Traits

  • The filter function type definition
  • The global function type definition
  • The tester function type definition

Functions

  • Lookups a dotted path in a json value contrary to the json slash pointer it’s not allowed to begin with a dot
  • Escape HTML following OWASP
  • Interpret a serde_json::Value as an instance of type T.
  • Converts a dotted path to a json pointer one
  • Convert a T into serde_json::Value which is an enum that can represent any valid JSON data.

Type Definitions

  • Convenient wrapper around std::Result.