pub struct Line {
pub kind: LineKind,
pub old_no: Option<u32>,
pub new_no: Option<u32>,
pub text: String,
pub no_newline: bool,
pub emphasis: Vec<Range<usize>>,
}Expand description
One line of a hunk.
Fields§
§kind: LineKind§old_no: Option<u32>1-based line number in the old text (None for added lines).
new_no: Option<u32>1-based line number in the new text (None for removed lines).
text: StringThe text, without its line break.
no_newline: boolThe line has no line break (\ No newline at end of file).
emphasis: Vec<Range<usize>>Byte ranges of text that changed against the paired line (word-level), sorted.
Trait Implementations§
impl Eq for Line
impl StructuralPartialEq for Line
Auto Trait Implementations§
impl Forget for Line
impl Freeze for Line
impl Move for Line
impl RefUnwindSafe for Line
impl Send for Line
impl Sync for Line
impl Unpin for Line
impl UnsafeUnpin for Line
impl UnwindSafe for Line
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