pub struct WorktreeIsolationManager { /* private fields */ }Expand description
Manages detached Git worktree creation, reattachment, and directory layout.
Implementations§
Source§impl WorktreeIsolationManager
impl WorktreeIsolationManager
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a manager rooted at the default cache directory
($XDG_CACHE_HOME/merry/worktrees, falling back to ~/.cache/merry/worktrees
or std::env::temp_dir().join("merry-worktrees")).
Sourcepub fn with_base_dir(base_dir: impl Into<PathBuf>) -> Self
pub fn with_base_dir(base_dir: impl Into<PathBuf>) -> Self
Creates a manager rooted at an explicit base directory (primarily for tests).
Sourcepub fn base_dir(&self) -> &Path
pub fn base_dir(&self) -> &Path
Returns the base directory under which instance worktree trees are stored.
Sourcepub fn instance_dir(&self) -> PathBuf
pub fn instance_dir(&self) -> PathBuf
Returns the process-scoped instance directory (<base_dir>/<instance_id>).
Trait Implementations§
Source§impl Clone for WorktreeIsolationManager
impl Clone for WorktreeIsolationManager
Source§impl Debug for WorktreeIsolationManager
impl Debug for WorktreeIsolationManager
Auto Trait Implementations§
impl Forget for WorktreeIsolationManager
impl Freeze for WorktreeIsolationManager
impl Move for WorktreeIsolationManager
impl RefUnwindSafe for WorktreeIsolationManager
impl Send for WorktreeIsolationManager
impl Sync for WorktreeIsolationManager
impl Unpin for WorktreeIsolationManager
impl UnsafeUnpin for WorktreeIsolationManager
impl UnwindSafe for WorktreeIsolationManager
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