pub struct FileDiff {
pub path: String,
pub from: Option<String>,
pub status: FileStatus,
pub added: usize,
pub removed: usize,
pub binary: bool,
pub hunks: Vec<Hunk>,
}Expand description
One file’s worth of a patch.
Fields§
§path: StringThe path after the change.
from: Option<String>The path before it, when the file moved.
status: FileStatusWhat happened to it.
added: usizeLines added.
removed: usizeLines removed.
binary: boolWhether this is a binary change, summarised rather than shown.
hunks: Vec<Hunk>The hunks retained for this file. Empty where they were all dropped — the entry itself always survives.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FileDiff
impl<'de> Deserialize<'de> for FileDiff
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for FileDiff
impl StructuralPartialEq for FileDiff
Auto Trait Implementations§
impl Freeze for FileDiff
impl RefUnwindSafe for FileDiff
impl Send for FileDiff
impl Sync for FileDiff
impl Unpin for FileDiff
impl UnsafeUnpin for FileDiff
impl UnwindSafe for FileDiff
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> Canonical for T
impl<T> Canonical for T
Source§fn canonical_bytes(&self) -> Result<Vec<u8>, CanonicalError>
fn canonical_bytes(&self) -> Result<Vec<u8>, CanonicalError>
The canonical CBOR encoding of this value.