diff options
| author | ozpv <39195175+ozpv@users.noreply.github.com> | 2026-05-26 01:06:55 -0500 |
|---|---|---|
| committer | ozpv <39195175+ozpv@users.noreply.github.com> | 2026-05-26 01:06:55 -0500 |
| commit | 16f8cf5ced3ddcbfb142665e3f372e0fc8be73c5 (patch) | |
| tree | b4761495520d84ce4a7043ec528e290a2d1b0506 /src/state.rs | |
| parent | 9590b3e84a9502accf801110b9695aab72423fb2 (diff) | |
add site
Diffstat (limited to 'src/state.rs')
| -rw-r--r-- | src/state.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/state.rs b/src/state.rs new file mode 100644 index 0000000..dfffbe0 --- /dev/null +++ b/src/state.rs @@ -0,0 +1,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) + } +} |
