#[non_exhaustive]pub struct Totals {
pub pass: u32,
pub fail: u32,
pub warn: u32,
pub excluded: u32,
pub unsupported: u32,
pub not_applicable: u32,
pub not_observed: u32,
}Expand description
Aggregate counts, in report order. excluded and unsupported are first-class:
inflating pass rates by hiding them is how conformance tools lose trust.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.pass: u32Requirements with outcome Outcome::Pass.
fail: u32Requirements with outcome Outcome::Fail.
warn: u32Requirements with outcome Outcome::Warn.
excluded: u32Requirements with outcome Outcome::Excluded.
unsupported: u32Requirements with outcome Outcome::Unsupported.
not_applicable: u32Requirements with outcome Outcome::NotApplicable.
not_observed: u32Requirements with outcome Outcome::NotObserved.
Implementations§
Source§impl Totals
impl Totals
Sourcepub const fn labelled(&self) -> [(&'static str, u32); 7]
pub const fn labelled(&self) -> [(&'static str, u32); 7]
Every outcome’s report label and count, in report order.
Destructured exhaustively on purpose, and that is the whole point of the
method existing: a field added to Totals fails to compile here until
it is given a label, and every summary line in the crate is formatted
from this one list. Hand-written write! arms could not offer that —
the single-revision line named all seven outcomes while the
multi-revision line named six, so the same run reported 140 clauses as
human text and 140 as JSON but only accounted for 125 of them in the
former. Counts that do not add up are how a conformance tool overstates
what it judged.
Trait Implementations§
impl Copy for Totals
Source§impl<'de> Deserialize<'de> for Totals
impl<'de> Deserialize<'de> for Totals
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>,
Source§impl Display for Totals
The counts as one phrase — 23 pass, 0 fail, … — naming every outcome.
impl Display for Totals
The counts as one phrase — 23 pass, 0 fail, … — naming every outcome.
The summary lines differ in what surrounds them (totals: on a
single-revision report, the revision and its verdict on a multi-revision
one) and agree on what is inside, so what is inside is written once.