pub struct DiffOptions { /* private fields */ }
Expand description
A collection of options for modifying the way a diff is performed
Implementations§
Source§impl DiffOptions
impl DiffOptions
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct a new DiffOptions
with default settings
§Defaults
- context_len = 3
- algorithm = Algorithm::Histogram
Sourcepub fn set_context_len(&mut self, context_len: usize) -> &mut Self
pub fn set_context_len(&mut self, context_len: usize) -> &mut Self
Set the number of context lines that should be used when producing a patch
Sourcepub fn set_algorithm(&mut self, algorithm: Algorithm) -> &mut Self
pub fn set_algorithm(&mut self, algorithm: Algorithm) -> &mut Self
Set the algorithm used to perform the diff.
Sourcepub fn set_original_filename<T>(&mut self, filename: T) -> &mut Self
pub fn set_original_filename<T>(&mut self, filename: T) -> &mut Self
Set the filename to be used in the patch for the original text
If not set, the default value is “original”.
Sourcepub fn set_modified_filename<T>(&mut self, filename: T) -> &mut Self
pub fn set_modified_filename<T>(&mut self, filename: T) -> &mut Self
Set the filename to be used in the patch for the modified text
If not set, the default value is “modified”.
Trait Implementations§
Source§impl Debug for DiffOptions
impl Debug for DiffOptions
Auto Trait Implementations§
impl Freeze for DiffOptions
impl RefUnwindSafe for DiffOptions
impl Send for DiffOptions
impl Sync for DiffOptions
impl Unpin for DiffOptions
impl UnwindSafe for DiffOptions
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