slave 0.2.0

Laravel-inspired CLI for Rust web apps: scaffold Axum projects with built-in auth, users, roles and Turso migrations
use std::sync::Arc;

use slave_framework::database::Database;

use super::config::Config;

/// State shared by every route in the application.
///
/// Services are built from it per request through `FromRef`, so this type
/// never needs to know about individual domain modules.
#[derive(Debug, Clone)]
pub struct AppState {
    pub config: Arc<Config>,
    pub database: Database,
}

impl AppState {
    pub fn new(config: Config, database: Database) -> Self {
        Self {
            config: Arc::new(config),
            database,
        }
    }
}