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

Function user

templating/handlebars/src/main.rs:26–35  ·  view source on GitHub ↗
(hb: web::Data<Handlebars<'_>>, path: web::Path<(String, String)>)

Source from the content-addressed store, hash-verified

24
25#[get("/{user}/{data}")]
26async fn user(hb: web::Data<Handlebars<'_>>, path: web::Path<(String, String)>) -> impl Responder {
27 let info = path.into_inner();
28 let data = json!({
29 "user": info.0,
30 "data": info.1
31 });
32 let body = hb.render("user", &data).unwrap();
33
34 web::Html::new(body)
35}
36
37#[actix_web::main]
38async fn main() -> io::Result<()> {

Callers

nothing calls this directly

Calls 1

renderMethod · 0.80

Tested by

no test coverage detected