pub struct MutateResult {
pub name: String,
pub version: String,
pub mutants_total: u64,
pub mutants_killed: u64,
pub mutants_survived: u64,
pub mutants_timeout: u64,
pub survivors: Vec<SurvivingMutant>,
pub files: Vec<FileBreakdown>,
}Expand description
Result of a mutation testing run.
Fields§
§name: StringSubject name.
version: StringSubject version.
mutants_total: u64Total mutants generated.
mutants_killed: u64Mutants caught by the test suite.
mutants_survived: u64Mutants the test suite missed.
mutants_timeout: u64Mutants that timed out (excluded from kill_pct).
survivors: Vec<SurvivingMutant>Per-survivor detail (sorted by (file, line) for determinism).
files: Vec<FileBreakdown>Per-file breakdown (sorted by file).
Implementations§
Source§impl MutateResult
impl MutateResult
Sourcepub fn kill_pct(&self) -> f64
pub fn kill_pct(&self) -> f64
Kill rate as a percent in [0.0, 100.0].
killed / (killed + survived) * 100. Timeouts excluded.
Sourcepub fn meets(&self, threshold: MutateThreshold) -> bool
pub fn meets(&self, threshold: MutateThreshold) -> bool
true when the kill rate meets or exceeds the given threshold.
Exists so callers can avoid recomputing kill_pct and the
comparison logic locally.
Sourcepub fn weakest_files(&self, n: usize) -> Vec<&FileBreakdown>
pub fn weakest_files(&self, n: usize) -> Vec<&FileBreakdown>
Files with the lowest kill rate, ascending. Useful for emitting evidence about test-quality hotspots.
Sourcepub fn into_check_result(self, threshold: MutateThreshold) -> CheckResult
pub fn into_check_result(self, threshold: MutateThreshold) -> CheckResult
Convert this result into a CheckResult against threshold.
Pass when kill_pct >= threshold, otherwise fail with
Severity::Warning (per REPS § 4 — mutation testing is
advisory by default). The verdict carries numeric evidence for
both the measured and target percentages plus the raw counts.
When survivors are present, the first one is attached as
Evidence::FileRef pointing at the affected (file, line).
Trait Implementations§
Source§impl Clone for MutateResult
impl Clone for MutateResult
Source§fn clone(&self) -> MutateResult
fn clone(&self) -> MutateResult
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more