use axum::extract::FromRef; use sqlx::PgPool; use crate::config::AppConfig; #[derive(Clone)] pub struct AppState { pub pool: PgPool, pub config: AppConfig, } impl FromRef for PgPool { fn from_ref(state: &AppState) -> Self { state.pool.clone() } }