13 lines
299 B
Rust
13 lines
299 B
Rust
|
use handlebars::{Handlebars, TemplateError};
|
||
|
|
||
|
#[derive(rust_embed::RustEmbed)]
|
||
|
#[folder = "src/service/http_tpl"]
|
||
|
#[prefix = "/"]
|
||
|
struct Dir;
|
||
|
|
||
|
pub fn get() -> Result<Handlebars<'static>, TemplateError> {
|
||
|
let mut reg = Handlebars::new();
|
||
|
reg.register_embed_templates::<Dir>()?;
|
||
|
Ok(reg)
|
||
|
}
|