pub struct GitWorktree { /* private fields */ }Implementations§
Source§impl GitWorktree
impl GitWorktree
pub fn new() -> Result<Self>
pub fn from_path(path: &Path) -> Result<Self>
pub fn create_worktree( &self, _name: &str, path: &Path, branch_name: &str, create_branch: bool, ) -> Result<()>
pub fn create_worktree_with_commit( &self, _name: &str, path: &Path, branch_name: &str, create_branch: bool, commit: Option<&str>, ) -> Result<()>
pub fn list_worktrees(&self) -> Result<Vec<WorktreeInfo>>
pub fn remove_worktree(&self, name: &str, force: bool) -> Result<()>
pub fn get_repository_root(&self) -> Result<PathBuf>
pub fn branch_exists(&self, branch_name: &str) -> Result<bool>
pub fn is_branch_merged( &self, branch_name: &str, base_branch: &str, ) -> Result<bool>
pub fn is_worktree_stale(&self, branch_name: &str, days: u32) -> Result<bool>
pub fn list_worktrees_with_status(&self) -> Result<Vec<WorktreeInfoWithStatus>>
Auto Trait Implementations§
impl !Sync for GitWorktree
impl Freeze for GitWorktree
impl RefUnwindSafe for GitWorktree
impl Send for GitWorktree
impl Unpin for GitWorktree
impl UnsafeUnpin for GitWorktree
impl UnwindSafe for GitWorktree
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