pub trait PhaseLabel:
Copy
+ PartialEq
+ 'static {
const ALL: &'static [Self];
// Required method
fn label(&self) -> &'static str;
}Expand description
A lifecycle-phase enum that can be rendered as a metric label.
The single source of truth for a CRD’s phase labels: PhaseLabel::ALL
enumerates every variant and PhaseLabel::label is an exhaustive match.
The controller’s kopiur_resource_phase gauge uses these to set the active
phase to 1 and the rest to 0 (and to clear all on deletion), so both the
label string and the reset set come from the enum itself rather than a
stringly-typed table that can silently drift (ADR §5.5 type-safety thesis).
Required Associated Constants§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.