pub enum HunkLine {
Context(Vec<u8>),
Insert(Vec<u8>),
Delete(Vec<u8>),
}Expand description
A single line inside a hunk. The stored bytes never include the trailing
line terminator; whether the line is terminated by \n is tracked
separately on the Hunk (see Hunk::old_no_newline /
Hunk::new_no_newline) so the no-final-newline case can be reproduced
byte-for-byte.
Variants§
Context(Vec<u8>)
A line present in both the old and new versions.
Insert(Vec<u8>)
A line added by the patch (present only in the new version).
Delete(Vec<u8>)
A line removed by the patch (present only in the old version).
Implementations§
Trait Implementations§
impl Eq for HunkLine
impl StructuralPartialEq for HunkLine
Auto Trait Implementations§
impl Freeze for HunkLine
impl RefUnwindSafe for HunkLine
impl Send for HunkLine
impl Sync for HunkLine
impl Unpin for HunkLine
impl UnsafeUnpin for HunkLine
impl UnwindSafe for HunkLine
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