pub struct UnifiedDiffFile { /* private fields */ }Expand description
Holds metadata and the patch for a single file in a unified diff.
Implementations§
Source§impl UnifiedDiffFile
impl UnifiedDiffFile
Sourcepub fn from(
from_file: impl Into<String>,
to_file: impl Into<String>,
patch: Patch<String>,
) -> Self
pub fn from( from_file: impl Into<String>, to_file: impl Into<String>, patch: Patch<String>, ) -> Self
Constructs a UnifiedDiffFile with initial from_file, to_file, and patch.
pub fn diff_command(&self) -> Option<&str>
pub fn set_diff_command(&mut self, diff_command: impl Into<String>)
pub fn from_file(&self) -> Option<&str>
pub fn set_from_file(&mut self, from_file: impl Into<String>)
pub fn to_file(&self) -> Option<&str>
pub fn set_to_file(&mut self, to_file: impl Into<String>)
pub fn index(&self) -> Option<&str>
pub fn set_index(&mut self, index: impl Into<String>)
pub fn patch(&self) -> &Patch<String>
pub fn patch_mut(&mut self) -> &mut Patch<String>
pub fn set_patch(&mut self, patch: Patch<String>)
pub fn from_timestamp(&self) -> Option<&str>
pub fn set_from_timestamp(&mut self, from_timestamp: impl Into<String>)
pub fn to_timestamp(&self) -> Option<&str>
pub fn set_to_timestamp(&mut self, to_timestamp: impl Into<String>)
pub fn similarity_index(&self) -> Option<i32>
pub fn set_similarity_index(&mut self, similarity_index: Option<i32>)
pub fn rename_from(&self) -> Option<&str>
pub fn set_rename_from(&mut self, rename_from: impl Into<String>)
pub fn rename_to(&self) -> Option<&str>
pub fn set_rename_to(&mut self, rename_to: impl Into<String>)
pub fn copy_from(&self) -> Option<&str>
pub fn set_copy_from(&mut self, copy_from: impl Into<String>)
pub fn copy_to(&self) -> Option<&str>
pub fn set_copy_to(&mut self, copy_to: impl Into<String>)
pub fn new_file_mode(&self) -> Option<&str>
pub fn set_new_file_mode(&mut self, new_file_mode: impl Into<String>)
pub fn deleted_file_mode(&self) -> Option<&str>
pub fn set_deleted_file_mode(&mut self, deleted_file_mode: impl Into<String>)
pub fn old_mode(&self) -> Option<&str>
pub fn set_old_mode(&mut self, old_mode: impl Into<String>)
pub fn new_mode(&self) -> Option<&str>
pub fn set_new_mode(&mut self, new_mode: impl Into<String>)
pub fn binary_added(&self) -> Option<&str>
pub fn set_binary_added(&mut self, binary_added: impl Into<String>)
pub fn binary_deleted(&self) -> Option<&str>
pub fn set_binary_deleted(&mut self, binary_deleted: impl Into<String>)
pub fn binary_edited(&self) -> Option<&str>
pub fn set_binary_edited(&mut self, binary_edited: impl Into<String>)
pub fn is_no_new_line_at_the_end_of_the_file(&self) -> bool
pub fn set_no_new_line_at_the_end_of_the_file(&mut self, val: bool)
Trait Implementations§
Source§impl Clone for UnifiedDiffFile
impl Clone for UnifiedDiffFile
Source§fn clone(&self) -> UnifiedDiffFile
fn clone(&self) -> UnifiedDiffFile
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnifiedDiffFile
impl Debug for UnifiedDiffFile
Source§impl Default for UnifiedDiffFile
impl Default for UnifiedDiffFile
Source§fn default() -> UnifiedDiffFile
fn default() -> UnifiedDiffFile
Returns the “default value” for a type. Read more
impl Eq for UnifiedDiffFile
Source§impl PartialEq for UnifiedDiffFile
impl PartialEq for UnifiedDiffFile
impl StructuralPartialEq for UnifiedDiffFile
Auto Trait Implementations§
impl !RefUnwindSafe for UnifiedDiffFile
impl !Send for UnifiedDiffFile
impl !Sync for UnifiedDiffFile
impl !UnwindSafe for UnifiedDiffFile
impl Freeze for UnifiedDiffFile
impl Unpin for UnifiedDiffFile
impl UnsafeUnpin for UnifiedDiffFile
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