pub struct Hunk {
pub source_start: usize,
pub source_length: usize,
pub target_start: usize,
pub target_length: usize,
pub section_header: String,
/* private fields */
}
Expand description
Each of the modified blocks of a file
You can iterate over it to get Line
s.
Fields
source_start: usize
Source file starting line number
source_length: usize
Source file changes length
target_start: usize
Target file starting line number
target_length: usize
Target file changes length
section_header: String
Section header
Implementations
sourceimpl Hunk
impl Hunk
pub fn new<T: Into<String>>(
source_start: usize,
source_length: usize,
target_start: usize,
target_length: usize,
section_header: T
) -> Hunk
sourcepub fn source_lines(&self) -> Vec<Line>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
pub fn source_lines(&self) -> Vec<Line>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Lines from source file
Trait Implementations
sourceimpl IntoIterator for Hunk
impl IntoIterator for Hunk
impl Eq for Hunk
impl StructuralEq for Hunk
impl StructuralPartialEq for Hunk
Auto Trait Implementations
impl RefUnwindSafe for Hunk
impl Send for Hunk
impl Sync for Hunk
impl Unpin for Hunk
impl UnwindSafe for Hunk
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more