pub struct Diff {
pub newly_failing: Vec<String>,
pub newly_passing: Vec<String>,
pub severity_changes: Vec<SeverityChange>,
pub duration_regressions: Vec<DurationRegression>,
pub added: Vec<String>,
pub removed: Vec<String>,
}Expand description
Result of comparing two Reports.
All vectors are sorted alphabetically by check name so two diffs of
the same input pair produce equal Diff values.
§Example
use dev_report::{CheckResult, Report, Severity};
let mut prev = Report::new("crate", "0.1.0");
prev.push(CheckResult::pass("a"));
prev.push(CheckResult::pass("b"));
let mut curr = Report::new("crate", "0.1.0");
curr.push(CheckResult::pass("a"));
curr.push(CheckResult::fail("b", Severity::Error));
curr.push(CheckResult::pass("c"));
let diff = curr.diff(&prev);
assert_eq!(diff.newly_failing, vec!["b".to_string()]);
assert_eq!(diff.added, vec!["c".to_string()]);Fields§
§newly_failing: Vec<String>Checks that are Fail in current but were not Fail in baseline
(or did not exist in baseline).
newly_passing: Vec<String>Checks that are Pass in current but were not Pass in baseline.
severity_changes: Vec<SeverityChange>Severity transitions for checks present in both reports.
duration_regressions: Vec<DurationRegression>Duration regressions for checks present in both reports, where the slowdown exceeds the configured threshold.
added: Vec<String>Checks present in current but not in baseline.
removed: Vec<String>Checks present in baseline but not in current.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Diff
impl<'de> Deserialize<'de> for Diff
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Diff
Auto Trait Implementations§
impl Freeze for Diff
impl RefUnwindSafe for Diff
impl Send for Diff
impl Sync for Diff
impl Unpin for Diff
impl UnsafeUnpin for Diff
impl UnwindSafe for Diff
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