pub struct Blame<'repo> { /* private fields */ }
Expand description
Opaque structure to hold blame results.
Implementations§
source§impl<'repo> Blame<'repo>
impl<'repo> Blame<'repo>
sourcepub fn blame_buffer(&self, buffer: &[u8]) -> Result<Blame<'_>, Error>
pub fn blame_buffer(&self, buffer: &[u8]) -> Result<Blame<'_>, Error>
Get blame data for a file that has been modified in memory.
Lines that differ between the buffer and the committed version are marked as having a zero OID for their final_commit_id.
sourcepub fn get_index(&self, index: usize) -> Option<BlameHunk<'_>>
pub fn get_index(&self, index: usize) -> Option<BlameHunk<'_>>
Gets the blame hunk at the given index.
Trait Implementations§
Auto Trait Implementations§
impl<'repo> Freeze for Blame<'repo>
impl<'repo> RefUnwindSafe for Blame<'repo>
impl<'repo> !Send for Blame<'repo>
impl<'repo> !Sync for Blame<'repo>
impl<'repo> Unpin for Blame<'repo>
impl<'repo> UnwindSafe for Blame<'repo>
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