pub struct Violation {
pub rule: &'static str,
pub fqn: &'static str,
pub measured: u32,
pub declared: u32,
pub level: &'static str,
}Expand description
A detected contract violation, in the play_launch rule-id vocabulary.
Fields§
§rule: &'static str"rate-hierarchy-runtime" | "max-age-runtime" |
"max-latency-runtime" | "deadline-miss-runtime" |
"stack-headroom-runtime" | "alive-supervision-runtime" |
"silence-runtime" | "route-latency-runtime" |
"route-deadline-runtime" |
"hazard-route-runtime" |
"hazard-level-runtime".
fqn: &'static strViolating endpoint ref (from the spec’s fqn; the SC name for
deadline misses).
measured: u32Measured value. Unit is per-rule: milli-Hz for the rate rule, ms for age/latency, µs for deadline misses, dropped activations for the timer-overrun rule.
declared: u32Declared bound, same unit as measured.
level: &'static strThe NAME of the fallback level a
hazard-level-runtime report is about, as the model spells it (the
mode key / degradation_levels[].level); "" for every other rule.
A field, and not a lookup at rendering time, because everything that
renders a verdict for a person – the log line, the drain-and-report
line, the /diagnostics message and the C/C++ drain – receives the
Violation alone, and none of them holds the hazard table that would
resolve measured (the level’s index) back to a name. The text is a
'static borrow of the baked RungSpec::level, so it costs a pointer
and a length and copies nothing. The trace markers and the SWD record
do NOT carry it: they keep their four words and seven-word slots, and a
reader resolves the index through the model, as it already resolves
fqn through its hash.