pub struct CriterionDescriptor {
pub key: &'static str,
pub label: &'static str,
pub help: &'static str,
pub quantity: Option<&'static str>,
pub kind: CriterionKind,
pub severities: &'static [CategorySeverity],
}Expand description
Descriptor of one criterion in an engine’s criteria catalog (spec §7.2).
key is stable per engine: applications persist valuations against it,
so renaming one is a compatibility break.
Fields§
§key: &'static strStable criterion identifier, unique within the engine.
label: &'static strHuman-facing name.
help: &'static strOne or two sentences on what the criterion judges.
quantity: Option<&'static str>§5 quantity key — values are in the quantity’s SI display unit —
or None for a dimensionless criterion.
kind: CriterionKindShape of the criterion’s value.
severities: &'static [CategorySeverity]What each region between the cut points means, ascending — one more entry than the criterion has cuts (spec §7.2).
Empty for a criterion that is judged in reports but never drawn. The engine’s to state because compliance is rarely monotonic: service pressure is worst when low, acceptable in a middle and worth attention again when high, and nothing in the numbers says which end is which.
Trait Implementations§
Source§impl Clone for CriterionDescriptor
impl Clone for CriterionDescriptor
Source§fn clone(&self) -> CriterionDescriptor
fn clone(&self) -> CriterionDescriptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more