pub enum MergePhase {
Prepare,
Build,
Validate,
Commit,
Cleanup,
Complete,
Aborted,
}Expand description
The current phase of the merge state machine.
Phases progress strictly forward: Prepare → Build → Validate → Commit → Cleanup → Complete. The Aborted state can be entered from any phase
except Complete.
Variants§
Prepare
Freeze inputs and write merge intent.
Build
Build the merged tree from collected workspace snapshots.
Validate
Run validation commands against the candidate commit.
Commit
Atomically update refs (point of no return).
Cleanup
Post-commit cleanup (remove temp files, update workspace state).
Complete
Merge completed successfully.
Aborted
Merge aborted — may include a reason.
Implementations§
Source§impl MergePhase
impl MergePhase
Sourcepub const fn is_terminal(&self) -> bool
pub const fn is_terminal(&self) -> bool
Returns true if this is a terminal state (Complete or Aborted).
Sourcepub const fn valid_transitions(&self) -> &'static [Self]
pub const fn valid_transitions(&self) -> &'static [Self]
Returns the set of valid next phases from this phase.
Aborted can be reached from any non-terminal phase.
Sourcepub fn can_transition_to(&self, next: &Self) -> bool
pub fn can_transition_to(&self, next: &Self) -> bool
Check whether transitioning to next is valid.
Trait Implementations§
Source§impl Clone for MergePhase
impl Clone for MergePhase
Source§fn clone(&self) -> MergePhase
fn clone(&self) -> MergePhase
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MergePhase
impl Debug for MergePhase
Source§impl<'de> Deserialize<'de> for MergePhase
impl<'de> Deserialize<'de> for MergePhase
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for MergePhase
impl Display for MergePhase
Source§impl Hash for MergePhase
impl Hash for MergePhase
Source§impl PartialEq for MergePhase
impl PartialEq for MergePhase
Source§impl Serialize for MergePhase
impl Serialize for MergePhase
impl Eq for MergePhase
impl StructuralPartialEq for MergePhase
Auto Trait Implementations§
impl Freeze for MergePhase
impl RefUnwindSafe for MergePhase
impl Send for MergePhase
impl Sync for MergePhase
impl Unpin for MergePhase
impl UnsafeUnpin for MergePhase
impl UnwindSafe for MergePhase
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.