conditions_equal

Function conditions_equal 

Source
pub fn conditions_equal(current: &[Condition], new: &[Condition]) -> bool
Expand description

Compare two condition lists to check if they are semantically equal.

This function compares two lists of conditions to determine if they represent the same state. It ignores lastTransitionTime differences and only compares the semantic content (type, status, reason, message).

§Arguments

  • current - The current conditions list
  • new - The new conditions list to compare

§Returns

  • true - The conditions are semantically equal (no update needed)
  • false - The conditions differ (update needed)

§Example

use bindy::reconcilers::status::conditions_equal;

let current_conditions = vec![/* ... */];
let new_conditions = vec![/* ... */];

if !conditions_equal(&current_conditions, &new_conditions) {
    // Conditions changed, update status
}