//! Application state for dependency injection use std::sync::Arc; use notes_domain::{NoteRepository, TagRepository, UserRepository}; /// Application state holding all dependencies #[derive(Clone)] pub struct AppState { pub note_repo: Arc, pub tag_repo: Arc, pub user_repo: Arc, } impl AppState { pub fn new( note_repo: Arc, tag_repo: Arc, user_repo: Arc, ) -> Self { Self { note_repo, tag_repo, user_repo, } } }