pub struct ModifiedFile<'c> { /* private fields */ }Expand description
A file that was touched in a commit
Implementations§
Source§impl<'c> ModifiedFile<'c>
impl<'c> ModifiedFile<'c>
Sourcepub fn new(diff: &'c Diff<'_>, n: usize) -> Self
pub fn new(diff: &'c Diff<'_>, n: usize) -> Self
Instantiate the modified file object from a git diff.
As a single diff can have > 1 modified/touched file, a single unsigned integer is provided to specify the delta and/or patch that this file looks to represent. Hence, the struct will normally be instantiated via iterating over the diff deltas as they are readily avaliable.
Auto Trait Implementations§
impl<'c> !Freeze for ModifiedFile<'c>
impl<'c> RefUnwindSafe for ModifiedFile<'c>
impl<'c> !Send for ModifiedFile<'c>
impl<'c> !Sync for ModifiedFile<'c>
impl<'c> Unpin for ModifiedFile<'c>
impl<'c> UnsafeUnpin for ModifiedFile<'c>
impl<'c> UnwindSafe for ModifiedFile<'c>
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