bunbun/src/template_args.rs

18 lines
334 B
Rust
Raw Normal View History

use serde::Serialize;
pub fn query(query: String) -> impl Serialize {
#[derive(Serialize)]
struct TemplateArgs {
query: String,
}
TemplateArgs { query }
}
pub fn hostname(hostname: String) -> impl Serialize {
#[derive(Serialize)]
pub struct TemplateArgs {
pub hostname: String,
}
TemplateArgs { hostname }
}