#[non_exhaustive]pub struct DeltaSummary {
pub added: u32,
pub removed: u32,
pub modified: u32,
pub regressions: u32,
pub improvements: u32,
pub new_violations: u32,
pub passed: bool,
}Expand description
Aggregate counts over a set of FunctionChanges.
passed is the delta gate: true iff new_violations == 0. The
CLI gates exit code on this only when --delta-gate is passed;
otherwise the delta is informational and result.passed alone
drives the exit code.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.added: u32§removed: u32§modified: u32§regressions: u32Modified rows where score_delta > 0 (current got worse).
improvements: u32Modified rows where score_delta < 0 (current got better).
new_violations: u32Threshold breaches introduced by this delta:
Addedrows whosecurrent.exceeds == trueModifiedrows wherebaseline.exceeds == falseANDcurrent.exceeds == true
Pre-existing violations (Modified rows where baseline.exceeds
was already true) do NOT contribute. This distinction matters
for the delta gate — we want to fail PRs that introduce risk,
not PRs that merely touch already-failing functions.
passed: boolnew_violations == 0. Drives the optional --delta-gate.
Implementations§
Source§impl DeltaSummary
impl DeltaSummary
pub fn compute(changes: &[FunctionChange]) -> Self
Trait Implementations§
Source§impl Clone for DeltaSummary
impl Clone for DeltaSummary
Source§fn clone(&self) -> DeltaSummary
fn clone(&self) -> DeltaSummary
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeltaSummary
impl Debug for DeltaSummary
Source§impl Default for DeltaSummary
impl Default for DeltaSummary
Source§fn default() -> DeltaSummary
fn default() -> DeltaSummary
Returns the “default value” for a type. Read more
Source§impl Serialize for DeltaSummary
impl Serialize for DeltaSummary
impl Copy for DeltaSummary
Auto Trait Implementations§
impl Freeze for DeltaSummary
impl RefUnwindSafe for DeltaSummary
impl Send for DeltaSummary
impl Sync for DeltaSummary
impl Unpin for DeltaSummary
impl UnsafeUnpin for DeltaSummary
impl UnwindSafe for DeltaSummary
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
Mutably borrows from an owned value. Read more