pub struct DiffBuilder<'a> { /* private fields */ }Expand description
Builder for diff operations Builder for creating diff operations with various options.
Implementations§
Source§impl<'a> DiffBuilder<'a>
impl<'a> DiffBuilder<'a>
Sourcepub fn new(
ctx: &'a mut Context,
path1: impl Into<String>,
revision1: Revision,
path2: impl Into<String>,
revision2: Revision,
) -> Self
pub fn new( ctx: &'a mut Context, path1: impl Into<String>, revision1: Revision, path2: impl Into<String>, revision2: Revision, ) -> Self
Creates a new DiffBuilder for comparing two paths/revisions.
Sourcepub fn diff_options(self, options: Vec<String>) -> Self
pub fn diff_options(self, options: Vec<String>) -> Self
Sets additional options to pass to the diff command.
Sourcepub fn relative_to_dir(self, dir: impl Into<String>) -> Self
pub fn relative_to_dir(self, dir: impl Into<String>) -> Self
Sets the directory to make paths relative to.
Sourcepub fn ignore_ancestry(self, ignore: bool) -> Self
pub fn ignore_ancestry(self, ignore: bool) -> Self
Sets whether to ignore ancestry when comparing.
Sourcepub fn no_diff_added(self, no_diff: bool) -> Self
pub fn no_diff_added(self, no_diff: bool) -> Self
Sets whether to omit diffs for added files.
Sourcepub fn no_diff_deleted(self, no_diff: bool) -> Self
pub fn no_diff_deleted(self, no_diff: bool) -> Self
Sets whether to omit diffs for deleted files.
Sourcepub fn show_copies_as_adds(self, show: bool) -> Self
pub fn show_copies_as_adds(self, show: bool) -> Self
Sets whether to show copies as additions.
Sourcepub fn ignore_content_type(self, ignore: bool) -> Self
pub fn ignore_content_type(self, ignore: bool) -> Self
Sets whether to ignore content type differences.
Sourcepub fn ignore_properties(self, ignore: bool) -> Self
pub fn ignore_properties(self, ignore: bool) -> Self
Sets whether to ignore property differences.
Sourcepub fn properties_only(self, only: bool) -> Self
pub fn properties_only(self, only: bool) -> Self
Sets whether to show only property differences.
Sourcepub fn use_git_diff_format(self, use_git: bool) -> Self
pub fn use_git_diff_format(self, use_git: bool) -> Self
Sets whether to use Git diff format.
Sourcepub fn header_encoding(self, encoding: impl Into<String>) -> Self
pub fn header_encoding(self, encoding: impl Into<String>) -> Self
Sets the encoding for diff headers.
Sourcepub fn changelists(self, lists: Vec<String>) -> Self
pub fn changelists(self, lists: Vec<String>) -> Self
Sets the changelists to include in the diff.
Auto Trait Implementations§
impl<'a> Freeze for DiffBuilder<'a>
impl<'a> !RefUnwindSafe for DiffBuilder<'a>
impl<'a> Send for DiffBuilder<'a>
impl<'a> !Sync for DiffBuilder<'a>
impl<'a> Unpin for DiffBuilder<'a>
impl<'a> UnsafeUnpin for DiffBuilder<'a>
impl<'a> !UnwindSafe for DiffBuilder<'a>
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