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

Function page

templating/sailfish/src/main.rs:30–36  ·  view source on GitHub ↗
(params: web::Path<(i32,)>)

Source from the content-addressed store, hash-verified

28
29#[get("/page-{id:\\d+}")]
30async fn page(params: web::Path<(i32,)>) -> actix_web::Result<impl Responder> {
31 let body = Page { id: &params.0 }
32 .render_once()
33 .map_err(error::ErrorInternalServerError)?;
34
35 Ok(web::Html::new(body))
36}
37
38#[get("/")]
39async fn hello() -> impl Responder {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected