pub struct ArchiveTaskUseCase<'a> { /* private fields */ }Expand description
Archives a task after optionally removing JJ workspaces.
Implementations§
Source§impl<'a> ArchiveTaskUseCase<'a>
impl<'a> ArchiveTaskUseCase<'a>
pub fn new(db: &'a Database) -> Self
pub fn resolve_task_id(&self, task_ref: Option<&str>) -> Result<i64>
pub fn find_dirty_workspaces(&self, task_id: i64) -> Result<Vec<DirtyWorkspace>>
Sourcepub fn execute(
&self,
task_id: i64,
allow_dirty: bool,
) -> Result<ArchiveTaskOutcome>
pub fn execute( &self, task_id: i64, allow_dirty: bool, ) -> Result<ArchiveTaskOutcome>
Removes workspaces and archives the task.
When allow_dirty is false and dirty workspaces exist, returns
TrackError::UncommittedWorkspaces so the caller can prompt the user.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ArchiveTaskUseCase<'a>
impl<'a> !Send for ArchiveTaskUseCase<'a>
impl<'a> !Sync for ArchiveTaskUseCase<'a>
impl<'a> !UnwindSafe for ArchiveTaskUseCase<'a>
impl<'a> Freeze for ArchiveTaskUseCase<'a>
impl<'a> Unpin for ArchiveTaskUseCase<'a>
impl<'a> UnsafeUnpin for ArchiveTaskUseCase<'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