MCPcopy Create free account
hub / github.com/actix/examples / index

Function index

templating/fluent/src/main.rs:32–36  ·  view source on GitHub ↗
(hb: web::Data<Handlebars<'_>>, lang: LangChoice)

Source from the content-addressed store, hash-verified

30
31#[get("/")]
32async fn index(hb: web::Data<Handlebars<'_>>, lang: LangChoice) -> impl Responder {
33 let data = json!({ "lang": lang });
34 let body = hb.render("index", &data).unwrap();
35 web::Html::new(body)
36}
37
38#[get("/{user}/{data}")]
39async fn user(

Callers

nothing calls this directly

Calls 1

renderMethod · 0.80

Tested by

no test coverage detected