pub struct BuildingEntry {
pub unit: &'static str,
pub provenance: Provenance,
pub calibrated: bool,
pub note: &'static str,
/* private fields */
}Expand description
One building metric: a standard this project fixes.
The value is deliberately not a public field. BuildingEntry::value is the
only way to read it and it takes &mut Reads, so nothing can rest a
verdict on an uncalibrated standard without saying that it did.
Fields§
§unit: &'static strWhat the value counts, or none.
provenance: ProvenanceWhere the number came from. Orthogonal to calibrated: a pitch’s
geometry can be derived from vanilla blocks while the judgement that it
is the standard is still unwalked.
calibrated: boolWhether the metrics gym’s walk has ruled on this value. false on every
entry at this version.
note: &'static strOne sentence: what the number is for and what the gym is being asked to decide about it.
Implementations§
Source§impl BuildingEntry
impl BuildingEntry
Sourcepub fn value(&self, reads: &mut Reads) -> &MetricValue
pub fn value(&self, reads: &mut Reads) -> &MetricValue
Read the value, recording the read.
The &mut Reads is the whole mechanism: Metrics::notice reports
exactly the uncalibrated entries a run actually consumed, so DW0813
cannot be forgotten by a check that reads one and can never fire over a
standard nothing looked at.