Crate include_js

Source

Macros§

include_js
Simmilar to include_str! from the stdlib but instead of including arbitrary files as &str it includes sytactically valid javascript from files as &JSStr. If the file contains invalid Javascript you will get a compiletime error.

Structs§

JSStr
Wrapper around str that ensures it contains syntactically valid Javascript. This is the borrowed version of JSString so &JSStr is to JSString what &str is to String
JSString
Wrapper around String that ensures it contains syntactically valid Javascript. See docs for JSStr for more info.
TemplateEngine
The single entry point of your Handlebars templates

Traits§

JSTemplate

Derive Macros§

JSTemplate
Derives the JSTemplate trait for a struct with named fields. This is simmilar to plain include_js! with the difference that the Javascript is not yet fully filled in, so a template engine (in this case Handlebars) to fill in the values at runtime.