pub struct DiffLine {
pub origin: LineOrigin,
pub old_lineno: Option<usize>,
pub new_lineno: Option<usize>,
pub text: Vec<u8>,
pub has_newline: bool,
}Expand description
One line of a hunk: content without prefix, plus the 1-based line
number on each side that has one (absent side: None, never 0).
Fields§
§origin: LineOrigin§old_lineno: Option<usize>§new_lineno: Option<usize>§text: Vec<u8>The line’s bytes WITHOUT its terminator (0018: byte-precise —
a \r stays; non-UTF-8 stays bytes).
has_newline: boolWhether the source line ended in a newline — the missing-final- newline marker is data, not a patch-text nuance (0018).
Implementations§
Trait Implementations§
impl Eq for DiffLine
impl StructuralPartialEq for DiffLine
Auto Trait Implementations§
impl Freeze for DiffLine
impl RefUnwindSafe for DiffLine
impl Send for DiffLine
impl Sync for DiffLine
impl Unpin for DiffLine
impl UnsafeUnpin for DiffLine
impl UnwindSafe for DiffLine
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