Re-exports§
pub use attrs::Attribute;
pub use attrs::Attributes;
pub use attrs::OptAttrValue;
pub use anyhow;
Modules§
Macros§
- This renders the attributes into a
PrerenderedAttrs
struct. This can later be used for attributes instantiation. - The
templ!
macro compiles down your template to anFnTemplate
closure. It uses HTML like syntax to write templates, except: - Return type for functions that return
templ! { ... }
. This takes a lifetime (defaults to'static
) and a context type (defaults to()
).
Structs§
- The
Error
type, a wrapper around a dynamic error type. - A wrapper for the
render_with_children_into
closure that implementsTemplate
. - A response struct that implements the various frameworks’ response traits
- Trust content and don’t escape it when interpolated in templates.
Traits§
- Mostly like
Display
, but with aDONT_ESCAPE
flag. - Main template trait. An implementation can be generated using the
templ!
macro. - Extension trait for generating a response
Functions§
- Writes html-escaped
value
intowriter
.
Type Aliases§
Result<T, Error>
Derive Macros§
- This derives the
Template
trait using allToTemplate
implementations. This implementation runsToTemplate::to_template
for every method of theTemplate
trait, so that method should be very lightweight (like usingtempl!
).