pub struct MergeResult {
pub chunks: Vec<MergeChunk>,
pub conflicts: usize,
pub ours_changes: usize,
pub theirs_changes: usize,
pub agree: usize,
pub ours_label: Option<String>,
pub theirs_label: Option<String>,
}Expand description
三方合并的完整结果:按文件顺序排列的块 + 统计信息。
Fields§
§chunks: Vec<MergeChunk>全部合并块,首尾相接覆盖整个文件
conflicts: usize冲突块数量
ours_changes: usize仅本地改动的块数量
theirs_changes: usize仅远端改动的块数量
agree: usize双方一致改动的块数量
ours_label: Option<String>本地侧标签(来自 <<<<<<< 后的分支名;三方模式下为 None)
theirs_label: Option<String>远端侧标签(来自 >>>>>>> 后的分支名;三方模式下为 None)
Trait Implementations§
Source§impl Clone for MergeResult
impl Clone for MergeResult
Source§fn clone(&self) -> MergeResult
fn clone(&self) -> MergeResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for MergeResult
impl RefUnwindSafe for MergeResult
impl Send for MergeResult
impl Sync for MergeResult
impl Unpin for MergeResult
impl UnsafeUnpin for MergeResult
impl UnwindSafe for MergeResult
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