pub struct CacheLayout {
pub root: PathBuf,
}Expand description
<cache>/dejavu/<repo_hash>/ and everything under it.
Fields§
§root: PathBufImplementations§
Source§impl CacheLayout
impl CacheLayout
Sourcepub fn for_repo(repo_root: &Path) -> Result<Self, PathError>
pub fn for_repo(repo_root: &Path) -> Result<Self, PathError>
Derive the layout for a repo from its root path.
Sourcepub fn from_dir(root: PathBuf) -> Self
pub fn from_dir(root: PathBuf) -> Self
Use an explicit cache dir (e.g. from DEJAVU_CACHE_DIR in a session, or
a temp dir in tests).
pub fn shims_bin(&self) -> PathBuf
pub fn db(&self) -> PathBuf
pub fn logs_dir(&self) -> PathBuf
pub fn stdout_log(&self, run_id: &str) -> PathBuf
pub fn stderr_log(&self, run_id: &str) -> PathBuf
pub fn normalized_log(&self, run_id: &str) -> PathBuf
pub fn sessions_dir(&self) -> PathBuf
pub fn session_file(&self, session_id: &str) -> PathBuf
pub fn effective_config(&self) -> PathBuf
pub fn state_file(&self) -> PathBuf
Sourcepub fn zdot_dir(&self) -> PathBuf
pub fn zdot_dir(&self) -> PathBuf
Wrapper ZDOTDIR used to re-assert the shim PATH after login-shell init.
Sourcepub fn ensure_dirs(&self) -> Result<(), PathError>
pub fn ensure_dirs(&self) -> Result<(), PathError>
mkdir -p all cache subdirectories. Idempotent.
Trait Implementations§
Source§impl Clone for CacheLayout
impl Clone for CacheLayout
Auto Trait Implementations§
impl Freeze for CacheLayout
impl RefUnwindSafe for CacheLayout
impl Send for CacheLayout
impl Sync for CacheLayout
impl Unpin for CacheLayout
impl UnsafeUnpin for CacheLayout
impl UnwindSafe for CacheLayout
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