Skip to main content

Merge

Struct Merge 

Source
pub struct Merge {
    pub conflict_log: ConflictLog,
    pub edit_log: EditLog,
    /* private fields */
}
Expand description

The main merge struct that orchestrates the 3-way merge.

Fields§

§conflict_log: ConflictLog

Log of conflicts encountered during merge.

§edit_log: EditLog

Log of edit operations performed.

Implementations§

Source§

impl Merge

Source

pub fn new(matching: TriMatching) -> Self

Creates a new Merge from a TriMatching.

Source

pub fn matching(&self) -> &TriMatching

Returns a reference to the tri-matching.

Source

pub fn merge<W: Write>(&mut self, writer: &mut W) -> Result<()>

Runs the 3-way merge and writes the result.

The output is written as XML to the provided writer.

Source

pub fn merge_to_tree(&mut self) -> NodeRef

Runs the 3-way merge and returns the merged tree.

This is useful when you need to programmatically inspect or further modify the merge result before output.

Auto Trait Implementations§

§

impl Freeze for Merge

§

impl !RefUnwindSafe for Merge

§

impl !Send for Merge

§

impl !Sync for Merge

§

impl Unpin for Merge

§

impl !UnwindSafe for Merge

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.