Struct bracket::registry::Registry [−][src]
pub struct Registry<'reg> { /* fields omitted */ }
Expand description
Registry is the entry point for compiling and rendering templates.
A template name is always required for error messages.
Implementations
Set the strict mode.
Set the escape function for rendering.
Helper registry.
Mutable reference to the helper registry.
Event handler registry.
Mutable reference to the event handler registry.
Mutable reference to the templates.
👎 Deprecated since 0.9.29: Use get() instead.
Use get() instead.
Get a named template.
Remove a named template.
Insert a named string template.
Add a named template from a file.
Requires the fs
feature.
Load a file and use the file path as the template name.
Requires the fs
feature.
Load all the files in a target directory that match the given extension.
The generated name is the file stem; ie, the name of the file once the extension has been removed.
Requires the fs
feature.
Compile a string to a template.
To compile a template and add it to this registry use insert(), add(), load() or read_dir().
Compile a string to a template using the given name.
This is a convenience function for calling compile() using parser options with the given name.
Lint a template.
Render a template without registering it and return the result as a string.
This function buffers the template nodes before rendering.
Render a named template and buffer the result to a string.
The named template must exist in the templates collection.
Render a compiled template without registering it and buffer the result to a string.
Auto Trait Implementations
impl<'reg> !RefUnwindSafe for Registry<'reg>
impl<'reg> !UnwindSafe for Registry<'reg>