Macros§
- 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§
- Wrapper around
str
that ensures it contains syntactically valid Javascript. This is the borrowed version ofJSString
so&JSStr
is toJSString
what&str
is toString
- Wrapper around
String
that ensures it contains syntactically valid Javascript. See docs forJSStr
for more info. - The single entry point of your Handlebars templates
Traits§
Derive Macros§
- Derives the
JSTemplate
trait for a struct with named fields. This is simmilar to plaininclude_js!
with the difference that the Javascript is not yet fully filled in, so a template engine (in this caseHandlebars
) to fill in the values at runtime.