|0.13.0||Aug 13, 2021|
|0.12.20||Jul 29, 2020|
|0.12.15||Jun 27, 2020|
|0.12.11||Mar 14, 2020|
|0.7.0||Nov 18, 2018|
#312 in Web programming
149 downloads per month
Used in mprober
This is a crate which provides macros
handlebars_response! to statically include HBS (Handlebars) files from your Rust project and make them be the HTTP response sources quickly.
handlebars_resources_initialize!is used in the fairing of
HandlebarsResponseto include Handlebars files into your executable binary file. You need to specify each file's name and its path relative to the directory containing the manifest of your package. In order to reduce the compilation time and allow to hot-reload templates, files are compiled into your executable binary file together, only when you are using the release profile.
handlebars_response!is used for retrieving and rendering the file you input through the macro
HandlebarsResponseinstance with rendered HTML. When its
respond_tomethod is called, three HTTP headers, Content-Type, Content-Length and Etag, will be automatically added, and the rendered HTML can optionally not be minified.
handlebars_response_cache!is used for wrapping a
HandlebarsResponseand its constructor, and use a key to cache its HTML and ETag in memory. The cache is generated only when you are using the release profile.
handlebars_resources_initializer!is used for generating a fairing for handlebars resources.