pub struct FileAnnotation { /* private fields */ }
Expand description
Annotation results for a specific file
Implementations§
Source§impl FileAnnotation
impl FileAnnotation
Sourcepub fn lines(
&self,
) -> impl Iterator<Item = (Result<&CommitId, &CommitId>, &BStr)>
pub fn lines( &self, ) -> impl Iterator<Item = (Result<&CommitId, &CommitId>, &BStr)>
Returns iterator over (commit_id, line)
s.
For each line, Ok(commit_id)
points to the originator commit of the
line. If no originator commit was found within the domain,
Err(commit_id)
should be set. It points to the root (or boundary)
commit where the line exists.
The line
includes newline character.
Sourcepub fn line_ranges(
&self,
) -> impl Iterator<Item = (Result<&CommitId, &CommitId>, Range<usize>)>
pub fn line_ranges( &self, ) -> impl Iterator<Item = (Result<&CommitId, &CommitId>, Range<usize>)>
Returns iterator over (commit_id, line_range)
s.
See Self::lines()
for commit_id
s.
The line_range
is a slice range in the file text
. Consecutive ranges
having the same commit_id
are not compacted.
Trait Implementations§
Source§impl Clone for FileAnnotation
impl Clone for FileAnnotation
Source§fn clone(&self) -> FileAnnotation
fn clone(&self) -> FileAnnotation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for FileAnnotation
impl RefUnwindSafe for FileAnnotation
impl Send for FileAnnotation
impl Sync for FileAnnotation
impl Unpin for FileAnnotation
impl UnwindSafe for FileAnnotation
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more