Skip to main content

Totals

Struct Totals 

Source
#[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
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.
§pass: u32

Requirements with outcome Outcome::Pass.

§fail: u32

Requirements with outcome Outcome::Fail.

§warn: u32

Requirements with outcome Outcome::Warn.

§excluded: u32

Requirements with outcome Outcome::Excluded.

§unsupported: u32

Requirements with outcome Outcome::Unsupported.

§not_applicable: u32

Requirements with outcome Outcome::NotApplicable.

§not_observed: u32

Requirements with outcome Outcome::NotObserved.

Implementations§

Source§

impl Totals

Source

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§

Source§

impl Clone for Totals

Source§

fn clone(&self) -> Totals

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Totals

Source§

impl Debug for Totals

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Totals

Source§

fn default() -> Totals

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Totals

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

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.

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Totals

Source§

impl PartialEq for Totals

Source§

fn eq(&self, other: &Totals) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for Totals

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Totals

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.