pub enum MergeStrategy {
Manual,
Ours,
Theirs,
LastWriterWins,
Custom(Box<dyn Fn(&Conflict) -> Resolution>),
}Expand description
Strategy for automatic conflict resolution during merge.
Variants§
Manual
Default: return MergeResult::Conflict for manual resolution.
Ours
Keep branch A’s value for all conflicts.
Theirs
Keep branch B’s value for all conflicts.
LastWriterWins
Compare timestamps, keep the newer value.
Custom(Box<dyn Fn(&Conflict) -> Resolution>)
Caller-defined logic: receives a &Conflict and returns a Resolution.
Auto Trait Implementations§
impl Freeze for MergeStrategy
impl !RefUnwindSafe for MergeStrategy
impl !Send for MergeStrategy
impl !Sync for MergeStrategy
impl Unpin for MergeStrategy
impl UnsafeUnpin for MergeStrategy
impl !UnwindSafe for MergeStrategy
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