pub struct FilePatch {
pub old_path: Option<String>,
pub new_path: Option<String>,
pub status: FileStatus,
pub binary: bool,
pub old_mode: Option<String>,
pub new_mode: Option<String>,
pub similarity: Option<u8>,
pub hunks: Vec<PatchHunk>,
pub additions: usize,
pub deletions: usize,
}Expand description
One file’s changes.
Fields§
§old_path: Option<String>The old path, None for an added file.
new_path: Option<String>The new path, None for a deleted file.
status: FileStatus§binary: bool§old_mode: Option<String>§new_mode: Option<String>§similarity: Option<u8>similarity index for renames and copies, in percent.
hunks: Vec<PatchHunk>§additions: usize§deletions: usizeImplementations§
Trait Implementations§
impl Eq for FilePatch
impl StructuralPartialEq for FilePatch
Auto Trait Implementations§
impl Freeze for FilePatch
impl RefUnwindSafe for FilePatch
impl Send for FilePatch
impl Sync for FilePatch
impl Unpin for FilePatch
impl UnsafeUnpin for FilePatch
impl UnwindSafe for FilePatch
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.