pub trait RecountSource {
// Required method
fn recount_patch(
&self,
from: &str,
to: &str,
) -> Result<Vec<u8>, EngineError>;
}Expand description
Invariant 4’s independent patch source, and nothing else.
A separate trait from DiffSource on purpose. Invariant 4 recounts
@@ headers over a patch of the tree the engine built, using a counter
that is deliberately not the parser. Sharing an accessor with enumeration
would mean one edit to one flag silently moving both sides of the
comparison together.
An implementation MUST call git directly and MUST NOT delegate to
DiffSource::canonical_patch — note the argv genuinely differs today, and
that duplication is the point rather than an oversight.
The return type is Vec<u8> and must stay Vec<u8>: the moment this port
hands invariant 4 anything structured, the counter stops being independent.
Required Methods§
fn recount_patch(&self, from: &str, to: &str) -> Result<Vec<u8>, EngineError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".