pub struct AppDir { /* private fields */ }Expand description
Application root directory.
The inner root is stored behind an Arc so AppDir::clone is
O(1) (refcount bump, no path allocation). Downstream services call
clone() on AppDir freely as part of per-request delegate
construction (see FsInstalledManifestStore and siblings in algocline-app);
keeping clone cheap avoids the per-call PathBuf allocation that an
owned PathBuf field would incur.
Implementations§
Source§impl AppDir
impl AppDir
pub fn new(root: PathBuf) -> Self
pub fn root(&self) -> &Path
pub fn packages_dir(&self) -> PathBuf
pub fn cards_dir(&self) -> PathBuf
pub fn state_dir(&self) -> PathBuf
pub fn evals_dir(&self) -> PathBuf
pub fn logs_dir(&self) -> PathBuf
pub fn scenarios_dir(&self) -> PathBuf
pub fn types_dir(&self) -> PathBuf
pub fn hub_cache_dir(&self) -> PathBuf
pub fn installed_json(&self) -> PathBuf
pub fn hub_registries_json(&self) -> PathBuf
pub fn config_toml(&self) -> PathBuf
pub fn init_lua(&self) -> PathBuf
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppDir
impl RefUnwindSafe for AppDir
impl Send for AppDir
impl Sync for AppDir
impl Unpin for AppDir
impl UnsafeUnpin for AppDir
impl UnwindSafe for AppDir
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more