pub const APP_NAME: &str = env!("CARGO_PKG_NAME"); pub const APP_VERSION: &str = env!("CARGO_PKG_VERSION"); #[derive(Clone)] pub struct AppState { pub name: String, pub version: String, } impl AppState { pub fn new() -> Self { Self { name: APP_NAME.to_string(), version: APP_VERSION.to_string(), } } } impl Default for AppState { fn default() -> Self { Self::new() } }