pub struct BlameHunk<'blame> { /* private fields */ }
Expand description
Structure that represents a blame hunk.
Implementations
sourceimpl<'blame> BlameHunk<'blame>
impl<'blame> BlameHunk<'blame>
sourcepub fn final_commit_id(&self) -> Oid
pub fn final_commit_id(&self) -> Oid
Returns OID of the commit where this line was last changed
sourcepub fn final_signature(&self) -> Signature<'_>
pub fn final_signature(&self) -> Signature<'_>
Returns signature of the commit.
sourcepub fn final_start_line(&self) -> usize
pub fn final_start_line(&self) -> usize
Returns line number where this hunk begins.
Note that the start line is counting from 1.
sourcepub fn orig_commit_id(&self) -> Oid
pub fn orig_commit_id(&self) -> Oid
Returns the OID of the commit where this hunk was found.
This will usually be the same as final_commit_id
,
except when BlameOptions::track_copies_any_commit_copies
has been
turned on
sourcepub fn orig_signature(&self) -> Signature<'_>
pub fn orig_signature(&self) -> Signature<'_>
Returns signature of the commit.
sourcepub fn orig_start_line(&self) -> usize
pub fn orig_start_line(&self) -> usize
Returns line number where this hunk begins.
Note that the start line is counting from 1.
sourcepub fn path(&self) -> Option<&Path>
pub fn path(&self) -> Option<&Path>
Returns path to the file where this hunk originated.
Note: None
could be returned for non-unicode paths on Widnows.
sourcepub fn is_boundary(&self) -> bool
pub fn is_boundary(&self) -> bool
Tests whether this hunk has been tracked to a boundary commit (the root, or the commit specified in git_blame_options.oldest_commit).
sourcepub fn lines_in_hunk(&self) -> usize
pub fn lines_in_hunk(&self) -> usize
Returns number of lines in this hunk.
Auto Trait Implementations
impl<'blame> RefUnwindSafe for BlameHunk<'blame>
impl<'blame> !Send for BlameHunk<'blame>
impl<'blame> !Sync for BlameHunk<'blame>
impl<'blame> Unpin for BlameHunk<'blame>
impl<'blame> UnwindSafe for BlameHunk<'blame>
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