1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
use std::path::PathBuf; use fidget_spinner_store_sqlite::StoreError; #[derive(Clone, Debug)] pub(super) struct HostConfig { pub(super) executable: PathBuf, pub(super) initial_project: Option<PathBuf>, } impl HostConfig { pub(super) fn new(initial_project: Option<PathBuf>) -> Result<Self, StoreError> { Ok(Self { executable: std::env::current_exe()?, initial_project, }) } }