Spaces:
Sleeping
Sleeping
Download src/state.rs from nishantcoder/aura-rs-backend: direct link, hf CLI and curl.
- Browser
- Download file 284 Bytes
-
https://huggingface.co/spaces/nishantcoder/aura-rs-backend/resolve/main/src/state.rs
- Command line
-
hf download hf://spaces/nishantcoder/aura-rs-backend/src/state.rs
-
curl -L -o state.rs https://huggingface.co/spaces/nishantcoder/aura-rs-backend/resolve/main/src/state.rs
284 Bytes
| use axum::extract::FromRef; | |
| use sqlx::PgPool; | |
| use crate::config::AppConfig; | |
| pub struct AppState { | |
| pub pool: PgPool, | |
| pub config: AppConfig, | |
| } | |
| impl FromRef<AppState> for PgPool { | |
| fn from_ref(state: &AppState) -> Self { | |
| state.pool.clone() | |
| } | |
| } | |