pub trait VcsBackend {
// Required methods
fn create_worktree(
&self,
repo_path: &Path,
worktree_path: &Path,
name: &str,
) -> Result<(), Error>;
fn remove_worktree(
&self,
repo_path: &Path,
worktree_path: &Path,
name: &str,
) -> Result<(), Error>;
fn list_worktrees(
&self,
repo_path: &Path,
worktree_base: &Path,
) -> Result<Vec<WorktreeInfo>, Error>;
}Expand description
Trait for VCS backends that manage worktrees/workspaces.
Required Methods§
fn create_worktree( &self, repo_path: &Path, worktree_path: &Path, name: &str, ) -> Result<(), Error>
fn remove_worktree( &self, repo_path: &Path, worktree_path: &Path, name: &str, ) -> Result<(), Error>
fn list_worktrees( &self, repo_path: &Path, worktree_base: &Path, ) -> Result<Vec<WorktreeInfo>, Error>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".