[−][src]Trait parsepatch::parser::Diff
A type to handle lines in a diff
Required methods
fn set_info(
&mut self,
old_name: &str,
new_name: &str,
op: FileOp,
binary_sizes: Option<Vec<BinaryHunk>>,
file_mode: Option<FileMode>
)
&mut self,
old_name: &str,
new_name: &str,
op: FileOp,
binary_sizes: Option<Vec<BinaryHunk>>,
file_mode: Option<FileMode>
)
Set the file info
fn add_line(&mut self, old_line: u32, new_line: u32, line: &[u8])
Add a line in the diff
If a line is added (+) then old_line is 0 and new_line is the line in the destination file.
If a line is added (-) then old_line is the line in the source file and new_line is 0.
If a line is added ( ) then old_line is the line in the source file and new_line is the line in the destination file.
fn new_hunk(&mut self)
A new hunk is created
fn close(&mut self)
Close the diff: no more lines will be added