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