summaryrefslogtreecommitdiff
path: root/src/state.rs
blob: dfffbe0dad9ed07c19156132832b19f76f3fc16f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::path::PathBuf;
use std::sync::Arc;

#[derive(Clone)]
pub struct AppState {
    dist_dir: Arc<PathBuf>,
}

impl AppState {
    pub fn new(dist_dir: PathBuf) -> Self {
        let dist_dir = Arc::new(dist_dir);

        Self { dist_dir }
    }
    pub fn get_dist_dir(&self) -> Arc<PathBuf> {
        Arc::clone(&self.dist_dir)
    }
}