14 lines
306 B
Rust
14 lines
306 B
Rust
use handlebars::Handlebars;
|
|
|
|
#[derive(rust_embed::RustEmbed)]
|
|
#[folder = "src/service/http_tpl"]
|
|
#[prefix = "/"]
|
|
struct Dir;
|
|
|
|
pub fn get<'hbs>() -> Handlebars<'hbs> {
|
|
let mut reg = Handlebars::new();
|
|
reg.register_embed_templates::<Dir>()
|
|
.expect("registered embedded templates");
|
|
reg
|
|
}
|