[][src]Struct diffy::MergeOptions

pub struct MergeOptions { /* fields omitted */ }

A collection of options for modifying the way a merge is performed

Implementations

impl MergeOptions[src]

pub fn new() -> Self[src]

Constructs a new MergeOptions with default settings

Defaults

  • conflict_marker_length = 7
  • style = ConflictStyle::Diff3

pub fn set_conflict_marker_length(
    &mut self,
    conflict_marker_length: usize
) -> &mut Self
[src]

Set the length of the conflict markers used when displaying a merge conflict

pub fn set_conflict_style(&mut self, style: ConflictStyle) -> &mut Self[src]

Set the conflict style used when displaying a merge conflict

pub fn merge<'a>(
    &self,
    ancestor: &'a str,
    ours: &'a str,
    theirs: &'a str
) -> Result<String, String>
[src]

Merge two files, given a common ancestor, based on the configured options

pub fn merge_bytes<'a>(
    &self,
    ancestor: &'a [u8],
    ours: &'a [u8],
    theirs: &'a [u8]
) -> Result<Vec<u8>, Vec<u8>>
[src]

Perform a 3-way merge between potentially non-utf8 texts

Trait Implementations

impl Debug for MergeOptions[src]

impl Default for MergeOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.