pub struct BlameSession { /* private fields */ }vcs-git only.Expand description
A PerFunctionBlame bound to one thread, holding the state a blame
would otherwise rebuild per file.
Obtained from PerFunctionBlame::session. Not Sync — it holds a
gix::Repository — so a worker pool wants one session per thread.
The engine it was opened from is kept alive by the session and
readable through engine, so a caller memoising
sessions can confirm a cached one belongs to the engine at hand.
Implementations§
Source§impl BlameSession
impl BlameSession
Sourcepub fn engine(&self) -> &Arc<PerFunctionBlame> ⓘ
pub fn engine(&self) -> &Arc<PerFunctionBlame> ⓘ
The engine this session was opened from.
Compare with Arc::ptr_eq to confirm a memoised session belongs
to the engine a caller is about to blame with.
Sourcepub fn commits_resolved(&self) -> usize
pub fn commits_resolved(&self) -> usize
How many distinct commits this session has resolved so far — the size of the memo that makes a session worth holding.
Grows only when a blame meets a commit the session has not seen,
so it is also how a caller sizes the session’s memory (see
SessionState::commits) or confirms the memo is doing its job.