pub struct WorktreeManager {
pub workspace_root: PathBuf,
/* private fields */
}Expand description
Main coordinator for all worktree operations
Fields§
§workspace_root: PathBufImplementations§
Source§impl WorktreeManager
impl WorktreeManager
Sourcepub async fn new(
workspace_root: PathBuf,
config: Option<WorktreeConfig>,
) -> Result<Self>
pub async fn new( workspace_root: PathBuf, config: Option<WorktreeConfig>, ) -> Result<Self>
Create a new WorktreeManager
Sourcepub async fn new_with_workspace_manager(
workspace_manager: &WorkspaceManager,
repo_path: Option<PathBuf>,
) -> Result<Self>
pub async fn new_with_workspace_manager( workspace_manager: &WorkspaceManager, repo_path: Option<PathBuf>, ) -> Result<Self>
Create a new WorktreeManager with workspace integration
Sourcepub async fn create_worktree(&self, task_id: String) -> Result<WorktreeInfo>
pub async fn create_worktree(&self, task_id: String) -> Result<WorktreeInfo>
Create a new worktree
Sourcepub async fn create_worktree_with_options(
&self,
options: CreateOptions,
) -> Result<WorktreeInfo>
pub async fn create_worktree_with_options( &self, options: CreateOptions, ) -> Result<WorktreeInfo>
Create a worktree with custom options
Sourcepub async fn remove_worktree(
&self,
branch_or_path: String,
force: bool,
) -> Result<()>
pub async fn remove_worktree( &self, branch_or_path: String, force: bool, ) -> Result<()>
Remove a worktree
Sourcepub async fn remove_worktree_with_options(
&self,
options: RemoveOptions,
) -> Result<()>
pub async fn remove_worktree_with_options( &self, options: RemoveOptions, ) -> Result<()>
Remove a worktree with custom options
Sourcepub async fn list_worktrees(&self) -> Result<Vec<WorktreeInfo>>
pub async fn list_worktrees(&self) -> Result<Vec<WorktreeInfo>>
List all worktrees
Sourcepub async fn get_git_root(&self) -> Result<PathBuf>
pub async fn get_git_root(&self) -> Result<PathBuf>
Get the git repository root
Sourcepub fn get_config(&self) -> &WorktreeConfig
pub fn get_config(&self) -> &WorktreeConfig
Get a reference to the config
Sourcepub async fn resolve_worktree_target(
&self,
target: &str,
) -> Result<WorktreeInfo>
pub async fn resolve_worktree_target( &self, target: &str, ) -> Result<WorktreeInfo>
Resolve target (task ID, branch name, or path) to worktree info
Sourcepub fn get_operations(&self) -> WorktreeOperations
pub fn get_operations(&self) -> WorktreeOperations
Get a clone of the operations (for cleanup)
Sourcepub async fn get_config_summary(&self) -> Result<ConfigSummary>
pub async fn get_config_summary(&self) -> Result<ConfigSummary>
Get configuration summary for diagnostics
Sourcepub async fn validate_configuration(&self) -> Result<Vec<ConfigValidationError>>
pub async fn validate_configuration(&self) -> Result<Vec<ConfigValidationError>>
Validate current configuration
Auto Trait Implementations§
impl Freeze for WorktreeManager
impl RefUnwindSafe for WorktreeManager
impl Send for WorktreeManager
impl Sync for WorktreeManager
impl Unpin for WorktreeManager
impl UnsafeUnpin for WorktreeManager
impl UnwindSafe for WorktreeManager
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