sailfish
sailfish copied to clipboard
Render from String as opposed from defining a template struct pointing to a file?
trafficstars
Is is possible to render directly from a String using dynamic attributes?
Doubt it. This crate is compile time based.
Although sailfish can't parse runtime template, Rendering based on compile-time string should be possible like this:
#[derive(TemplateOnce)]
#[template = "<div><%= name %></div>"]
struct Template {
name: String
}