pub struct DiffLine<'a> { /* private fields */ }
Expand description
Structure describing a line (or data span) of a diff.
Implementations
sourceimpl<'a> DiffLine<'a>
impl<'a> DiffLine<'a>
sourcepub fn old_lineno(&self) -> Option<u32>
pub fn old_lineno(&self) -> Option<u32>
Line number in old file or None
for added line
sourcepub fn new_lineno(&self) -> Option<u32>
pub fn new_lineno(&self) -> Option<u32>
Line number in new file or None
for deleted line
sourcepub fn content_offset(&self) -> i64
pub fn content_offset(&self) -> i64
Offset in the original file to the content
sourcepub fn content(&self) -> &'a [u8]ⓘNotable traits for &'_ mut [u8]impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
pub fn content(&self) -> &'a [u8]ⓘNotable traits for &'_ mut [u8]impl<'_> Write for &'_ mut [u8]impl<'_> Read for &'_ [u8]
Content of this line as bytes.
sourcepub fn origin_value(&self) -> DiffLineType
pub fn origin_value(&self) -> DiffLineType
origin of this DiffLine
.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for DiffLine<'a>
impl<'a> !Send for DiffLine<'a>
impl<'a> !Sync for DiffLine<'a>
impl<'a> Unpin for DiffLine<'a>
impl<'a> UnwindSafe for DiffLine<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more