mod error; pub mod router; pub use error::{Error, Result, ResultTemplate}; use minijinja::{Environment, Template}; use serde::{Deserialize, Serialize}; use std::sync::Arc; pub type Tx = axum_sqlx_tx::Tx; #[derive(Serialize, Deserialize, Debug)] pub struct Link { pub path: String, pub text: String, pub subpages: Vec, } pub struct AppState { tmpl_env: Environment<'static>, } impl AppState { pub fn new(tmpl_env: Environment<'static>) -> Arc { Arc::new(AppState { tmpl_env }) } pub fn get_template(&self, name: &str) -> Result