pub struct FilePatch {
pub old_file_name: String,
pub new_file_name: String,
pub old_header: Option<String>,
pub new_header: Option<String>,
pub hunks: Vec<FilePatchHunk>,
pub index: Option<String>,
}Expand description
A structured patch describing changes between two file versions.
Fields§
§old_file_name: StringThe old file name.
new_file_name: StringThe new file name.
old_header: Option<String>The old file header (optional).
new_header: Option<String>The new file header (optional).
hunks: Vec<FilePatchHunk>The list of hunks in this patch.
index: Option<String>The index line (optional, e.g. git blob hashes).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FilePatch
impl<'de> Deserialize<'de> for FilePatch
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 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 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