pub struct StatusRule {
pub field: String,
pub op: RuleOp,
pub value: Value,
pub level: StatusLevel,
}Expand description
A status-inference rule: when field op value holds, assign level.
The field is a dotted JSON path (e.g. status.phase, spec.replicas); the core
resolves it against the live object. This is declarative, so the schema is
structural — no free-form expression language (that lands with the full lens engine
in later M2.2 work).
Fields§
§field: StringDotted JSON path to the field, e.g. "status.phase".
op: RuleOpThe comparison.
value: ValueThe value to compare against (string, number, or bool).
level: StatusLevelThe level to assign when the rule matches.
Trait Implementations§
Source§impl Clone for StatusRule
impl Clone for StatusRule
Source§fn clone(&self) -> StatusRule
fn clone(&self) -> StatusRule
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StatusRule
impl Debug for StatusRule
Source§impl<'de> Deserialize<'de> for StatusRule
impl<'de> Deserialize<'de> for StatusRule
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for StatusRule
impl PartialEq for StatusRule
Source§impl Serialize for StatusRule
impl Serialize for StatusRule
impl StructuralPartialEq for StatusRule
Auto Trait Implementations§
impl Freeze for StatusRule
impl RefUnwindSafe for StatusRule
impl Send for StatusRule
impl Sync for StatusRule
impl Unpin for StatusRule
impl UnsafeUnpin for StatusRule
impl UnwindSafe for StatusRule
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