pub struct MutationStatusCounts {
pub total: usize,
pub killed: usize,
pub timeout: usize,
pub survived: usize,
pub no_coverage: usize,
pub runtime_error: usize,
pub flaky: usize,
pub pruned: usize,
pub pending: usize,
pub equivalent: usize,
pub compile_error: usize,
}Expand description
The number of mutants for each status, and the mutation score.
Fields§
§total: usizeEach mutant.
killed: usizeKilled mutants.
timeout: usizeMutants that passed their timeout.
survived: usizeMutants that each covering test let pass.
no_coverage: usizeMutants that no test reaches.
runtime_error: usizeMutants with a runner fault.
flaky: usizeMutants where the second run in a new companion changed whether the tests detect the mutant.
pruned: usizeMutants that a static rule removed.
pending: usizeMutants that did not run.
equivalent: usizeMutants that a verdict marks as equivalent.
compile_error: usizeSurvived mutants that do not type-check. A report from a version
before --typecheck has no such field, so it reads as 0.
Implementations§
Source§impl MutationStatusCounts
impl MutationStatusCounts
Sourcepub const fn executed(&self) -> usize
pub const fn executed(&self) -> usize
The mutants that ran against the tests: killed, timeout,
survived, runtime_error, flaky and compile_error.
Sourcepub const fn add(&mut self, status: MutantStatus)
pub const fn add(&mut self, status: MutantStatus)
Adds one mutant with status.
Sourcepub const fn remove(&mut self, status: MutantStatus)
pub const fn remove(&mut self, status: MutantStatus)
Removes one mutant with status. The count never goes below zero.
Sourcepub fn score(&self) -> Option<f64>
pub fn score(&self) -> Option<f64>
The mutation score over the executed mutants: (killed + timeout) / (killed + timeout + survived), from 0 to 1. None when no mutant
ran to a tested result.
no_coverage mutants stay out of the score;
MutationSummary::coverage reports them. Runtime errors, flaky, pruned,
pending, equivalent and compile-error mutants never count.
Trait Implementations§
Source§impl Clone for MutationStatusCounts
impl Clone for MutationStatusCounts
impl Copy for MutationStatusCounts
Source§impl Debug for MutationStatusCounts
impl Debug for MutationStatusCounts
Source§impl Default for MutationStatusCounts
impl Default for MutationStatusCounts
Source§impl<'de> Deserialize<'de> for MutationStatusCounts
impl<'de> Deserialize<'de> for MutationStatusCounts
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>,
impl Eq for MutationStatusCounts
Source§impl PartialEq for MutationStatusCounts
impl PartialEq for MutationStatusCounts
Source§impl Serialize for MutationStatusCounts
impl Serialize for MutationStatusCounts
impl StructuralPartialEq for MutationStatusCounts
Auto Trait Implementations§
impl Freeze for MutationStatusCounts
impl RefUnwindSafe for MutationStatusCounts
impl Send for MutationStatusCounts
impl Sync for MutationStatusCounts
impl Unpin for MutationStatusCounts
impl UnsafeUnpin for MutationStatusCounts
impl UnwindSafe for MutationStatusCounts
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.