pub struct RebaseCheckpoint {
pub phase: RebasePhase,
pub upstream_branch: String,
pub conflicted_files: Vec<String>,
pub resolved_files: Vec<String>,
pub error_count: u32,
pub last_error: Option<String>,
pub timestamp: String,
pub phase_error_count: u32,
}Expand description
Checkpoint data for rebase operations.
This structure contains all the information needed to resume a rebase operation after an interruption.
Fields§
§phase: RebasePhaseCurrent phase of the rebase.
upstream_branch: StringUpstream branch being rebased onto.
conflicted_files: Vec<String>Files with conflicts.
resolved_files: Vec<String>Files that have been resolved.
error_count: u32Number of errors encountered.
last_error: Option<String>Last error message.
timestamp: StringTimestamp of checkpoint.
phase_error_count: u32Number of errors encountered in the current phase.
Implementations§
Source§impl RebaseCheckpoint
impl RebaseCheckpoint
Sourcepub fn with_phase(self, phase: RebasePhase) -> Self
pub fn with_phase(self, phase: RebasePhase) -> Self
Set the phase of the rebase.
Resets the phase error count when transitioning to a new phase.
Sourcepub fn with_conflicted_file(self, file: String) -> Self
pub fn with_conflicted_file(self, file: String) -> Self
Add a conflicted file.
Sourcepub fn with_resolved_file(self, file: String) -> Self
pub fn with_resolved_file(self, file: String) -> Self
Add a resolved file.
Sourcepub fn with_error(self, error: String) -> Self
pub fn with_error(self, error: String) -> Self
Add an error.
Increments both the global error count and the phase-specific error count.
Sourcepub fn all_conflicts_resolved(&self) -> bool
pub fn all_conflicts_resolved(&self) -> bool
Check if all conflicts are resolved.
Sourcepub fn unresolved_conflict_count(&self) -> usize
pub fn unresolved_conflict_count(&self) -> usize
Get the number of unresolved conflicts.
Trait Implementations§
Source§impl Clone for RebaseCheckpoint
impl Clone for RebaseCheckpoint
Source§fn clone(&self) -> RebaseCheckpoint
fn clone(&self) -> RebaseCheckpoint
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 RebaseCheckpoint
impl Debug for RebaseCheckpoint
Source§impl Default for RebaseCheckpoint
impl Default for RebaseCheckpoint
Source§impl<'de> Deserialize<'de> for RebaseCheckpoint
impl<'de> Deserialize<'de> for RebaseCheckpoint
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
Auto Trait Implementations§
impl Freeze for RebaseCheckpoint
impl RefUnwindSafe for RebaseCheckpoint
impl Send for RebaseCheckpoint
impl Sync for RebaseCheckpoint
impl Unpin for RebaseCheckpoint
impl UnwindSafe for RebaseCheckpoint
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more