Skip to main content

Runner

Struct Runner 

Source
pub struct Runner { /* private fields */ }
Expand description

Launch and supervise Git commands with bounded output capture.

Implementations§

Source§

impl Runner

Source

pub fn new(executable: impl Into<PathBuf>) -> Self

Select the Git executable to run.

Source

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.

Source

pub async fn git( &self, directory: &Path, arguments: &[&str], control: &Control, ) -> Result<CommandOutput, Problem>

Execute Git with UTF-8 arguments.

Source

pub async fn checked( &self, directory: &Path, arguments: &[OsString], control: &Control, ) -> Result<Vec<u8>, Problem>

Return stdout after checking process status and capture completeness.

Source§

impl Runner

Source

pub async fn inspect_placement( &self, participant: &Participant, project: Option<&Path>, control: &Control, ) -> Result<Placement, Problem>

Inspect registered and candidate locations before choosing a repair.

Source

pub async fn apply_placement( &self, participant: &Participant, preview: &Placement, activate: bool, unavailable_worktrees: &HashSet<String>, control: &Control, ) -> Result<(), Problem>

Apply the verified placement decision for this participant.

Trait Implementations§

Source§

impl AmendGit for Runner

Source§

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>

Repair the relationship for the verified participant.
Source§

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 Clone for Runner

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for Runner

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Git for Runner

Source§

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>

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>

Resolve the backing repository, its identity and the selected remote.
Source§

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>

Resolve reuse, tracking or creation of the task branch.
Source§

async fn fetch( &self, repository: &Repository, control: &Control, ) -> Result<(), Problem>

Refresh refs from the selected remote under Workyard’s fetch coordination.
Source§

async fn add( &self, repository: &Repository, task: &str, destination: &Path, plan: &BranchPlan, control: &Control, ) -> Result<(), Problem>

Create the linked worktree using the resolved branch plan.
Source§

impl ObservationGit for Runner

Source§

async fn observe( &self, participant: &Participant, control: &Control, ) -> Result<GitFacts, Problem>

Collect live repository facts for a recorded participant.
Source§

impl RecoveryGit for Runner

Source§

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>

Ask Git to reconcile verified backing and linked worktree paths.
Source§

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

Source§

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>

Unlink the verified worktree under the selected removal policy.
Source§

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>

Only for durable successful recreation evidence, never a failed add attempt.
Source§

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.