pub trait FacetTerm:
Copy
+ Eq
+ Sized
+ 'static {
// Required methods
fn all() -> &'static [Self];
fn as_str(self) -> &'static str;
fn from_term(s: &str) -> Option<Self>;
fn hazard() -> Self;
}Expand description
A single facet term: the closed vocabulary of one axis, with its TOML spelling.
Required Methods§
Sourcefn all() -> &'static [Self]
fn all() -> &'static [Self]
Every term, in declaration order (for ordinals, least-severe first).
Sourcefn hazard() -> Self
fn hazard() -> Self
The term a level is LEAST likely to admit — the one Capability::worst carries on this axis.
For an ORDINAL it is derived, never written: the ladder top for a severity ladder, and the
bottom for one marked inverted; (Isolation, Pinning — trust ladders where higher is
safer and a level FLOORS them, >= namespace, >= version). Only the DIRECTION is
declared, because direction has an objectively right answer while the hazard is a
consequence of it, and declaring a consequence lets the two disagree.
A CATEGORICAL still declares it, and must: there is no order to derive from.
TriggerKind::None means “not recurring”, the benign case, while Clock/Event are what
persist — nothing about the term list says which.
Hand-writing this per axis inside worst() is what let it drift once already: it carried
TriggerKind::None, so a clause allowing only non-recurring triggers admitted the
fail-closed sentinel on that axis. The ordinal half of that exposure is now gone by
construction; the categorical half is guarded by
a_declared_hazard_is_the_term_authored_levels_reject, which can only speak for the axes
some level constrains (TODO.md, “Eleven facet axes have no authored level constraint”).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".