use actix_web::{web, HttpResponse, Responder}; use ramhorns::Content; use crate::{config::Config, template::Infos}; pub async fn page(config: web::Data) -> impl Responder { HttpResponse::NotFound().body(get_page(config.get_ref().clone())) } #[derive(Content)] struct Error404Template {} pub fn get_page(config: Config) -> std::string::String { config .tmpl .render("404.html", Error404Template {}, Infos::default()) }