use actix_web::{HttpResponse, Responder}; use askama::Template; pub async fn page() -> impl Responder { HttpResponse::NotFound().body(get_page()) } #[derive(Template)] #[template(path = "../templates/404.html")] struct Error404Template {} pub fn get_page() -> std::string::String { let index = Error404Template {}; index.render().unwrap() }