pub struct StateSetValue {
pub states: Vec<(String, bool)>,
}Expand description
OpenMetrics §5.7: named-state indicator set. Each
(state, active) pair renders as a separate Metric in
exposition with the state name carried as a label.
Spec §5.7 requires that exactly one state in a StateSet MAY be true at a time when the StateSet encodes an enum (vs a free bitset). This struct doesn’t enforce the “exactly one” constraint — that’s a producer-side convention.
Fields§
§states: Vec<(String, bool)>Each entry is (state_name, active_bool). State
names are arbitrary strings (no ABNF restriction
beyond label-value rules).
Implementations§
Trait Implementations§
Source§impl Clone for StateSetValue
impl Clone for StateSetValue
Source§impl Debug for StateSetValue
impl Debug for StateSetValue
Auto Trait Implementations§
impl Freeze for StateSetValue
impl RefUnwindSafe for StateSetValue
impl Send for StateSetValue
impl Sync for StateSetValue
impl Unpin for StateSetValue
impl UnsafeUnpin for StateSetValue
impl UnwindSafe for StateSetValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more