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_after_effective: Option<f64>,
pub total_before: Option<f64>,
pub file_deltas: Vec<FileDelta>,
pub notable_unchanged: Vec<FileDelta>,
pub indirect: Vec<IndirectChange>,
pub markers: Vec<AppliedMarker>,
}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 — the real, measured value, and the one that is displayed.
total_after_effective: Option<f64>Head project coverage with tolerate masking applied, used for the
headline direction and delta. Equal to total_after unless a tolerated
line flipped. None without a baseline, where there is nothing to mask.
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.
Flips on tolerated head lines are excluded: they are precisely the
cross-run variance the marker exists to silence.
markers: Vec<AppliedMarker>Source-marker regions that applied, for the visibility note. Empty when no marker was found.
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 moreSource§impl Debug for CoverageDiff
impl Debug for CoverageDiff
Source§impl Default for CoverageDiff
impl Default for CoverageDiff
Source§fn default() -> CoverageDiff
fn default() -> CoverageDiff
Auto Trait Implementations§
impl Freeze for CoverageDiff
impl RefUnwindSafe for CoverageDiff
impl Send for CoverageDiff
impl Sync for CoverageDiff
impl Unpin for CoverageDiff
impl UnsafeUnpin for CoverageDiff
impl UnwindSafe for CoverageDiff
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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