Skip to main content

DiffOptions

Struct DiffOptions 

Source
pub struct DiffOptions {
Show 13 fields pub diff_options: Vec<String>, pub depth: Depth, pub ignore_ancestry: bool, pub no_diff_added: bool, pub no_diff_deleted: bool, pub show_copies_as_adds: bool, pub ignore_content_type: bool, pub ignore_properties: bool, pub properties_only: bool, pub use_git_diff_format: bool, pub pretty_print_mergeinfo: bool, pub header_encoding: String, pub changelists: Option<Vec<String>>,
}
Expand description

Options for diff operations

Fields§

§diff_options: Vec<String>

Diff-specific options to pass to diff engine.

§depth: Depth

Recursion depth.

§ignore_ancestry: bool

Whether to ignore ancestry when calculating diffs.

§no_diff_added: bool

If true, don’t show diffs for added files.

§no_diff_deleted: bool

If true, don’t show diffs for deleted files.

§show_copies_as_adds: bool

If true, show copies as additions.

§ignore_content_type: bool

If true, ignore content type.

§ignore_properties: bool

If true, ignore properties.

§properties_only: bool

If true, show only properties.

§use_git_diff_format: bool

If true, use Git diff format.

§pretty_print_mergeinfo: bool

If true, pretty-print svn:mergeinfo properties in the diff output.

§header_encoding: String

Encoding for headers.

§changelists: Option<Vec<String>>

Changelists to limit operation to (None means all).

Implementations§

Source§

impl DiffOptions

Source

pub fn new() -> Self

Creates a new DiffOptions with default values.

Source

pub fn with_diff_options(self, diff_options: Vec<String>) -> Self

Sets the diff options.

Source

pub fn with_depth(self, depth: Depth) -> Self

Sets the depth.

Source

pub fn with_ignore_ancestry(self, ignore_ancestry: bool) -> Self

Sets whether to ignore ancestry.

Source

pub fn with_no_diff_added(self, no_diff_added: bool) -> Self

Sets whether to skip diffs for added files.

Source

pub fn with_no_diff_deleted(self, no_diff_deleted: bool) -> Self

Sets whether to skip diffs for deleted files.

Source

pub fn with_show_copies_as_adds(self, show_copies_as_adds: bool) -> Self

Sets whether to show copies as additions.

Source

pub fn with_ignore_content_type(self, ignore_content_type: bool) -> Self

Sets whether to ignore content type.

Source

pub fn with_ignore_properties(self, ignore_properties: bool) -> Self

Sets whether to ignore properties.

Source

pub fn with_properties_only(self, properties_only: bool) -> Self

Sets whether to show only properties.

Source

pub fn with_use_git_diff_format(self, use_git_diff_format: bool) -> Self

Sets whether to use Git diff format.

Source

pub fn with_header_encoding(self, header_encoding: String) -> Self

Sets the header encoding.

Source

pub fn with_changelists(self, changelists: Vec<String>) -> Self

Sets the changelists.

Trait Implementations§

Source§

impl Clone for DiffOptions

Source§

fn clone(&self) -> DiffOptions

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for DiffOptions

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DiffOptions

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.