Crate russx

source ·
Expand description

Russx

Russx implements a template rendering engine based on rstml. It generates Rust code from your templates at compile time using a macro. This crate is inpired by both Askama and Leptos.

To create templates use the templates macro, or the tmpl for dynamic templates.

Macros

  • Define static templates.
  • Define dynamic templates, basically the content of a template funcation inside templates This returns TemplateFn. To see the syntax and usage information check templates.

Structs

  • A dynamic template generated from a function. This is the type of <prop _ /> and children when instantiating a static template.

Enums

Traits

  • The attribute trait, this will write a single attribute.
  • The attributes trait, this can write a variable amount of attributes. You can use this within a template using a braced attribute, {...}.
  • Main template trait. Implementations can be generated using both the tmpl and templates macros.

Type Aliases