pub struct Runner { /* private fields */ }Expand description
Launch and supervise Git commands with bounded output capture.
Implementations§
Source§impl Runner
impl Runner
Sourcepub async fn run(
&self,
directory: &Path,
arguments: &[OsString],
control: &Control,
) -> Result<CommandOutput, Problem>
pub async fn run( &self, directory: &Path, arguments: &[OsString], control: &Control, ) -> Result<CommandOutput, Problem>
Execute native arguments in the supplied directory under the cancellation policy.
Trait Implementations§
Source§impl AmendGit for Runner
impl AmendGit for Runner
Source§async fn relationship(
&self,
repository: &Repository,
participant: &Participant,
control: &Control,
) -> Result<Relationship, Problem>
async fn relationship( &self, repository: &Repository, participant: &Participant, control: &Control, ) -> Result<Relationship, Problem>
Locate the registered participant and determine whether its links need repair.
Source§async fn repair(
&self,
repository: &Repository,
participant: &Participant,
control: &Control,
) -> Result<(), Problem>
async fn repair( &self, repository: &Repository, participant: &Participant, control: &Control, ) -> Result<(), Problem>
Repair the relationship for the verified participant.
Source§async fn move_worktree(
&self,
repository: &Repository,
participant: &Participant,
destination: &Path,
control: &Control,
) -> Result<(), Problem>
async fn move_worktree( &self, repository: &Repository, participant: &Participant, destination: &Path, control: &Control, ) -> Result<(), Problem>
Ask Git to move the participant worktree to its destination.
Source§impl Git for Runner
impl Git for Runner
Source§async fn worktree_identity(
&self,
path: &Path,
) -> Result<Option<String>, Problem>
async fn worktree_identity( &self, path: &Path, ) -> Result<Option<String>, Problem>
Identity used to verify the linked worktree before applying changes.
Source§async fn validate_branch(
&self,
root: &Path,
task: &str,
control: &Control,
) -> Result<(), Problem>
async fn validate_branch( &self, root: &Path, task: &str, control: &Control, ) -> Result<(), Problem>
Ask Git to validate the task’s proposed branch name.
Source§async fn inspect(
&self,
path: &Path,
remote: Option<&str>,
control: &Control,
) -> Result<Repository, Problem>
async fn inspect( &self, path: &Path, remote: Option<&str>, control: &Control, ) -> Result<Repository, Problem>
Resolve the backing repository, its identity and the selected remote.
Source§async fn revalidate(
&self,
repository: &Repository,
control: &Control,
) -> Result<(), Problem>
async fn revalidate( &self, repository: &Repository, control: &Control, ) -> Result<(), Problem>
Check the repository against its earlier identity before proceeding.
Source§async fn plan(
&self,
repository: &Repository,
task: &str,
checkout: bool,
from: Option<&str>,
resolution: SourceResolution,
control: &Control,
) -> Result<BranchPlan, Problem>
async fn plan( &self, repository: &Repository, task: &str, checkout: bool, from: Option<&str>, resolution: SourceResolution, control: &Control, ) -> Result<BranchPlan, Problem>
Resolve reuse, tracking or creation of the task branch.
Source§impl ObservationGit for Runner
impl ObservationGit for Runner
Source§impl RecoveryGit for Runner
impl RecoveryGit for Runner
Source§async fn recovery_relationship(
&self,
participant: &Participant,
control: &Control,
) -> Result<Option<Relationship>, Problem>
async fn recovery_relationship( &self, participant: &Participant, control: &Control, ) -> Result<Option<Relationship>, Problem>
Discover an identity-verified location needing repair without changing Git.
Source§async fn repair_relationship(
&self,
repository: &Repository,
participant: &Participant,
control: &Control,
) -> Result<(), Problem>
async fn repair_relationship( &self, repository: &Repository, participant: &Participant, control: &Control, ) -> Result<(), Problem>
Ask Git to reconcile verified backing and linked worktree paths.
Source§async fn reconcile(
&self,
participant: &Participant,
task: &str,
control: &Control,
) -> Result<RecoveryObservation, Problem>
async fn reconcile( &self, participant: &Participant, task: &str, control: &Control, ) -> Result<RecoveryObservation, Problem>
Inspect actual participant placement before resuming recorded work.
Source§impl RemovalGit for Runner
impl RemovalGit for Runner
Source§async fn inspect_removal(
&self,
participant: &Participant,
control: &Control,
) -> Result<RemovalObservation, Problem>
async fn inspect_removal( &self, participant: &Participant, control: &Control, ) -> Result<RemovalObservation, Problem>
Collect identity, history and local changes before unlinking.
Source§async fn remove_worktree(
&self,
observation: &RemovalObservation,
discard: bool,
control: &Control,
before_unlink: impl FnOnce() -> Result<(), Problem> + Send,
) -> Result<(), UnlinkFailure>
async fn remove_worktree( &self, observation: &RemovalObservation, discard: bool, control: &Control, before_unlink: impl FnOnce() -> Result<(), Problem> + Send, ) -> Result<(), UnlinkFailure>
Unlink the verified worktree under the selected removal policy.
Source§async fn inspect_restoration(
&self,
participant: &Participant,
branch: &str,
control: &Control,
) -> Result<Repository, Problem>
async fn inspect_restoration( &self, participant: &Participant, branch: &str, control: &Control, ) -> Result<Repository, Problem>
Check whether the retained branch and destination permit restoration.
Source§async fn reconcile_recreation(
&self,
participant: &Participant,
branch: &str,
control: &Control,
) -> Result<RecoveryObservation, Problem>
async fn reconcile_recreation( &self, participant: &Participant, branch: &str, control: &Control, ) -> Result<RecoveryObservation, Problem>
Only for durable successful recreation evidence, never a failed add attempt.
Source§async fn reconcile_restored(
&self,
participant: &Participant,
control: &Control,
) -> Result<RecoveryObservation, Problem>
async fn reconcile_restored( &self, participant: &Participant, control: &Control, ) -> Result<RecoveryObservation, Problem>
Verify a worktree recreated during removal recovery.
Auto Trait Implementations§
impl Forget for Runner
impl Freeze for Runner
impl Move for Runner
impl RefUnwindSafe for Runner
impl Send for Runner
impl Sync for Runner
impl Unpin for Runner
impl UnsafeUnpin for Runner
impl UnwindSafe for Runner
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