pub struct BlameCache { /* private fields */ }Expand description
Per-run cache of git blame output, shared across rules so
multiple git_blame_age rules over overlapping paths:
re-use the parsed result instead of re-shelling-out.
Constructed once per Engine::run when
at least one rule reports wants_git_blame(). Lookups lock
once per (path, miss) — git blame itself dwarfs any lock
contention (process spawn + read of full file history). The
cache also memoises failures (file untracked, blame exited
non-zero) so a rule iterating thousands of out-of-scope files
doesn’t re-probe each one repeatedly.
Implementations§
Source§impl BlameCache
impl BlameCache
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for BlameCache
impl RefUnwindSafe for BlameCache
impl Send for BlameCache
impl Sync for BlameCache
impl Unpin for BlameCache
impl UnsafeUnpin for BlameCache
impl UnwindSafe for BlameCache
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> 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