Trait LineOriginSource
pub trait LineOriginSource {
// Required method
fn origins(
&self,
rev: &str,
path: &str,
lines: &[u32],
) -> Result<Vec<(u32, String)>>;
}Expand description
Pluggable line-origin seam (roadmap’s “pluggable SZZ”). Given a file at a
revision, returns for each requested 1-based line the commit that last
introduced it. The production impl (CLI) shells git blame --porcelain;
tests use an in-memory fake.
Required Methods§
fn origins(
&self,
rev: &str,
path: &str,
lines: &[u32],
) -> Result<Vec<(u32, String)>>
fn origins( &self, rev: &str, path: &str, lines: &[u32], ) -> Result<Vec<(u32, String)>>
Blame path at rev for the given 1-based lines, returning
(line, introducing_commit) pairs. Implementations may return fewer
pairs than requested lines (e.g. a line beyond EOF at rev); callers
must not assume a 1:1 return count.
§Errors
Any I/O or subprocess failure the backend hits reading path at
rev. Callers treat this as a skip-with-log, never fatal.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".