[][src]Struct git2::DiffLine

pub struct DiffLine<'a> { /* fields omitted */ }

Structure describing a line (or data span) of a diff.

Methods

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 context
  • + - Line addition
  • - - Line deletion
  • = - Context (End of file)
  • > - Add (End of file)
  • < - Remove (End of file)
  • F - File header
  • H - Hunk header
  • B - Line binary

Auto Trait Implementations

impl<'a> !Send for DiffLine<'a>

impl<'a> !Sync for DiffLine<'a>

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]