pub struct CoverageDiff {
pub patch: PatchCoverage,
pub file_patches: Vec<FilePatch>,
pub uncovered_new_lines: Vec<(String, u32)>,
pub has_baseline: bool,
pub total_after: Option<f64>,
pub total_before: Option<f64>,
pub file_deltas: Vec<FileDelta>,
pub notable_unchanged: Vec<FileDelta>,
pub indirect: Vec<IndirectChange>,
}Expand description
The full attribution result.
Fields§
§patch: PatchCoverageProject-wide patch coverage.
file_patches: Vec<FilePatch>Per-file patch coverage (only files with added, instrumented lines).
uncovered_new_lines: Vec<(String, u32)>Flattened actionable list of uncovered added lines.
has_baseline: boolWhether a baseline report was supplied (enables the fields below).
total_after: Option<f64>Head project coverage percentage.
total_before: Option<f64>Baseline project coverage percentage (requires a baseline).
file_deltas: Vec<FileDelta>Per-file project deltas (requires a baseline). Under DiffScope::DiffOnly
this lists only files the diff touched.
notable_unchanged: Vec<FileDelta>Files the diff did not touch whose coverage nonetheless moved by at
least [NOTABLE_UNCHANGED_LINES] covered lines (requires a baseline; only
populated under DiffScope::DiffOnly). These are flagged separately as
not attributable to the PR, so a real cross-file regression still shows
while small measurement-noise flips stay hidden.
indirect: Vec<IndirectChange>Indirect coverage flips on unchanged lines (requires a baseline). Under
DiffScope::DiffOnly this lists only flips within files the diff touched.
Implementations§
Source§impl CoverageDiff
impl CoverageDiff
Sourcepub fn indirect_newly_covered(&self) -> usize
pub fn indirect_newly_covered(&self) -> usize
Indirect lines that became covered.
Sourcepub fn indirect_newly_uncovered(&self) -> usize
pub fn indirect_newly_uncovered(&self) -> usize
Indirect lines that became uncovered.
Trait Implementations§
Source§impl Clone for CoverageDiff
impl Clone for CoverageDiff
Source§fn clone(&self) -> CoverageDiff
fn clone(&self) -> CoverageDiff
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more