pub struct CriterionOutcome {
pub criterion: JudgeCriterion,
pub votes: Vec<JudgeVote>,
}Expand description
Every vote about one criterion of one sample, and their aggregate.
Fields§
§criterion: JudgeCriterionWhat was graded.
votes: Vec<JudgeVote>The votes, in order.
Implementations§
Source§impl CriterionOutcome
impl CriterionOutcome
Sourcepub const fn empty(criterion: JudgeCriterion) -> Self
pub const fn empty(criterion: JudgeCriterion) -> Self
An outcome with no votes at all.
Sourcepub fn majority_score(&self) -> Option<u8>
pub fn majority_score(&self) -> Option<u8>
The score the majority of votes gave.
The modal score wins. A tie goes to the lower score: a judging harness that breaks its own ties upwards is not a measurement.
Sourcepub fn spread(&self) -> u8
pub fn spread(&self) -> u8
Difference between the highest and lowest score returned: how much the judge disagreed with itself.
Sourcepub fn failed_votes(&self) -> usize
pub fn failed_votes(&self) -> usize
How many votes failed to produce a verdict.
Trait Implementations§
Source§impl Clone for CriterionOutcome
impl Clone for CriterionOutcome
Source§impl Debug for CriterionOutcome
impl Debug for CriterionOutcome
Source§impl<'de> Deserialize<'de> for CriterionOutcome
impl<'de> Deserialize<'de> for CriterionOutcome
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 Eq for CriterionOutcome
Source§impl PartialEq for CriterionOutcome
impl PartialEq for CriterionOutcome
Source§impl Serialize for CriterionOutcome
impl Serialize for CriterionOutcome
impl StructuralPartialEq for CriterionOutcome
Auto Trait Implementations§
impl Freeze for CriterionOutcome
impl RefUnwindSafe for CriterionOutcome
impl Send for CriterionOutcome
impl Sync for CriterionOutcome
impl Unpin for CriterionOutcome
impl UnsafeUnpin for CriterionOutcome
impl UnwindSafe for CriterionOutcome
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.