pub struct TaggedLine<'a> {
pub kind: LineKind,
pub content: &'a [u8],
pub old_index: usize,
pub new_index: usize,
}Expand description
One line of the unified diff, with its origin and 0-based positions in the old/new files (used to compute hunk ranges and feed the word-diff hook).
Fields§
§kind: LineKindWhether the line is context / a deletion / an insertion.
content: &'a [u8]The raw line bytes, including the trailing \n when present.
old_index: usize0-based index of this line on the old side.
new_index: usize0-based index of this line on the new side.
Trait Implementations§
Source§impl<'a> Clone for TaggedLine<'a>
impl<'a> Clone for TaggedLine<'a>
Source§fn clone(&self) -> TaggedLine<'a>
fn clone(&self) -> TaggedLine<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for TaggedLine<'a>
Auto Trait Implementations§
impl<'a> Freeze for TaggedLine<'a>
impl<'a> RefUnwindSafe for TaggedLine<'a>
impl<'a> Send for TaggedLine<'a>
impl<'a> Sync for TaggedLine<'a>
impl<'a> Unpin for TaggedLine<'a>
impl<'a> UnsafeUnpin for TaggedLine<'a>
impl<'a> UnwindSafe for TaggedLine<'a>
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