Struct git2::DiffLine [−][src]
Structure describing a line (or data span) of a diff.
Implementations
impl<'a> DiffLine<'a>
[src]
pub fn old_lineno(&self) -> Option<u32>
[src]
Line number in old file or None
for added line
pub fn new_lineno(&self) -> Option<u32>
[src]
Line number in new file or None
for deleted line
pub fn num_lines(&self) -> u32
[src]
Number of newline characters in content
pub fn content_offset(&self) -> i64
[src]
Offset in the original file to the content
pub fn content(&self) -> &[u8]ⓘ
[src]
Content of this line as bytes.
pub fn origin(&self) -> char
[src]
Sigil showing the origin of this DiffLine
.
+
- Line addition-
- Line deletion=
- Context (End of file)>
- Add (End of file)<
- Remove (End of file)F
- File headerH
- Hunk headerB
- Line binary
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
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,