Skip to main content

RemovalGit

Trait RemovalGit 

Source
pub trait RemovalGit: Git {
    // Required methods
    fn reconcile_recreation(
        &self,
        participant: &Participant,
        branch: &str,
        control: &Control,
    ) -> impl Future<Output = Result<RecoveryObservation, Problem>> + Send;
    fn reconcile_restored(
        &self,
        participant: &Participant,
        control: &Control,
    ) -> impl Future<Output = Result<RecoveryObservation, Problem>> + Send;
    fn inspect_removal(
        &self,
        participant: &Participant,
        control: &Control,
    ) -> impl Future<Output = Result<RemovalObservation, Problem>> + Send;
    fn remove_worktree(
        &self,
        observation: &RemovalObservation,
        discard: bool,
        control: &Control,
        before_unlink: impl FnOnce() -> Result<(), Problem> + Send,
    ) -> impl Future<Output = Result<(), UnlinkFailure>> + Send;
    fn inspect_restoration(
        &self,
        participant: &Participant,
        branch: &str,
        control: &Control,
    ) -> impl Future<Output = Result<Repository, Problem>> + Send;
}
Expand description

Inspect, unlink and restore participants while preserving retained history.

Required Methods§

Source

fn reconcile_recreation( &self, participant: &Participant, branch: &str, control: &Control, ) -> impl Future<Output = Result<RecoveryObservation, Problem>> + Send

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

Source

fn reconcile_restored( &self, participant: &Participant, control: &Control, ) -> impl Future<Output = Result<RecoveryObservation, Problem>> + Send

Verify a worktree recreated during removal recovery.

Source

fn inspect_removal( &self, participant: &Participant, control: &Control, ) -> impl Future<Output = Result<RemovalObservation, Problem>> + Send

Collect identity, history and local changes before unlinking.

Source

fn remove_worktree( &self, observation: &RemovalObservation, discard: bool, control: &Control, before_unlink: impl FnOnce() -> Result<(), Problem> + Send, ) -> impl Future<Output = Result<(), UnlinkFailure>> + Send

Unlink the verified worktree under the selected removal policy.

Source

fn inspect_restoration( &self, participant: &Participant, branch: &str, control: &Control, ) -> impl Future<Output = Result<Repository, Problem>> + Send

Check whether the retained branch and destination permit restoration.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§