Struct MergeFileOptions

Source
pub struct MergeFileOptions { /* private fields */ }
Expand description

Options for merging a file.

Implementations§

Source§

impl MergeFileOptions

Source

pub fn new() -> MergeFileOptions

Creates a default set of merge file options.

Source

pub fn ancestor_label<T: IntoCString>(&mut self, t: T) -> &mut MergeFileOptions

Label for the ancestor file side of the conflict which will be prepended to labels in diff3-format merge files.

Source

pub fn our_label<T: IntoCString>(&mut self, t: T) -> &mut MergeFileOptions

Label for our file side of the conflict which will be prepended to labels in merge files.

Source

pub fn their_label<T: IntoCString>(&mut self, t: T) -> &mut MergeFileOptions

Label for their file side of the conflict which will be prepended to labels in merge files.

Source

pub fn favor(&mut self, favor: FileFavor) -> &mut MergeFileOptions

Specify a side to favor for resolving conflicts

Source

pub fn style_standard(&mut self, standard: bool) -> &mut MergeFileOptions

Create standard conflicted merge files

Source

pub fn style_diff3(&mut self, diff3: bool) -> &mut MergeFileOptions

Create diff3-style file

Source

pub fn simplify_alnum(&mut self, simplify: bool) -> &mut MergeFileOptions

Condense non-alphanumeric regions for simplified diff file

Source

pub fn ignore_whitespace(&mut self, ignore: bool) -> &mut MergeFileOptions

Ignore all whitespace

Source

pub fn ignore_whitespace_change( &mut self, ignore: bool, ) -> &mut MergeFileOptions

Ignore changes in amount of whitespace

Source

pub fn ignore_whitespace_eol(&mut self, ignore: bool) -> &mut MergeFileOptions

Ignore whitespace at end of line

Source

pub fn patience(&mut self, patience: bool) -> &mut MergeFileOptions

Use the “patience diff” algorithm

Source

pub fn minimal(&mut self, minimal: bool) -> &mut MergeFileOptions

Take extra time to find minimal diff

Source

pub fn style_zdiff3(&mut self, zdiff3: bool) -> &mut MergeFileOptions

Create zdiff3 (“zealous diff3”)-style files

Source

pub fn accept_conflicts(&mut self, accept: bool) -> &mut MergeFileOptions

Do not produce file conflicts when common regions have changed

Source

pub fn marker_size(&mut self, size: u16) -> &mut MergeFileOptions

The size of conflict markers (eg, “<<<<<<<”). Default is 7.

Trait Implementations§

Source§

impl Default for MergeFileOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
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.
Source§

impl<T> ErasedDestructor for T
where T: 'static,