pub struct WorktreeService<'a> { /* private fields */ }Implementations§
Source§impl<'a> WorktreeService<'a>
impl<'a> WorktreeService<'a>
pub fn new(db: &'a Database) -> Self
pub fn add_worktree( &self, task_id: i64, repo_path: &str, branch: Option<&str>, ticket_id: Option<&str>, todo_id: Option<i64>, is_base: bool, ) -> Result<Worktree>
pub fn add_existing_worktree( &self, task_id: i64, repo_path: &str, branch: &str, todo_id: Option<i64>, is_base: bool, worktree_path: Option<&str>, ) -> Result<Worktree>
pub fn recreate_worktree( &self, worktree: &Worktree, force: bool, ) -> Result<Worktree>
pub fn get_worktree(&self, worktree_id: i64) -> Result<Worktree>
pub fn list_worktrees(&self, task_id: i64) -> Result<Vec<Worktree>>
pub fn list_repo_links(&self, worktree_id: i64) -> Result<Vec<RepoLink>>
pub fn remove_worktree(&self, worktree_id: i64, keep_files: bool) -> Result<()>
pub fn bookmark_exists_in_repo( &self, repo_path: &str, bookmark: &str, ) -> Result<bool>
pub fn task_bookmark_name( &self, task_id: i64, ticket_id: Option<&str>, ) -> String
Sourcepub fn get_todo_branch_name(
&self,
task_id: i64,
ticket_id: Option<&str>,
todo_index: i64,
) -> Result<String>
pub fn get_todo_branch_name( &self, task_id: i64, ticket_id: Option<&str>, todo_index: i64, ) -> Result<String>
Calculates the expected bookmark name for a TODO item. This allows clients to know the bookmark name even before the workspace is created.
pub fn complete_worktree_for_todo(&self, todo_id: i64) -> Result<Option<String>>
pub fn has_uncommitted_changes(&self, path: &str) -> Result<bool>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for WorktreeService<'a>
impl<'a> !Send for WorktreeService<'a>
impl<'a> !Sync for WorktreeService<'a>
impl<'a> !UnwindSafe for WorktreeService<'a>
impl<'a> Freeze for WorktreeService<'a>
impl<'a> Unpin for WorktreeService<'a>
impl<'a> UnsafeUnpin for WorktreeService<'a>
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