pub struct FileDelta {
pub path: String,
pub before: Option<f64>,
pub after: Option<f64>,
pub after_effective: Option<f64>,
}Expand description
Per-file project coverage delta (requires a baseline report).
Fields§
§path: StringRepo-relative head path.
before: Option<f64>Baseline coverage percentage (None for a file new to head).
after: Option<f64>Head coverage percentage (None when the file has no executable lines).
Always the real, measured value — this is what is displayed.
after_effective: Option<f64>Head coverage with tolerate masking applied: tolerated lines scored
with their baseline hit status instead of their head one.
Equal to after unless a tolerated line actually flipped. It is what
delta reports, so the number stays honest while the
signal stops moving with cross-run variance.
Implementations§
Source§impl FileDelta
impl FileDelta
Sourcepub fn new(
path: impl Into<String>,
before: Option<f64>,
after: Option<f64>,
) -> Self
pub fn new( path: impl Into<String>, before: Option<f64>, after: Option<f64>, ) -> Self
Creates a delta whose effective coverage is its real coverage — the case for every file with no tolerated line.
Sourcepub fn delta(&self) -> Option<f64>
pub fn delta(&self) -> Option<f64>
Percentage-point change, or None when there is no baseline value.
Computed from after_effective, so a flip on a
tolerated line does not register as a change.
Trait Implementations§
impl StructuralPartialEq for FileDelta
Auto Trait Implementations§
impl Freeze for FileDelta
impl RefUnwindSafe for FileDelta
impl Send for FileDelta
impl Sync for FileDelta
impl Unpin for FileDelta
impl UnsafeUnpin for FileDelta
impl UnwindSafe for FileDelta
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