pub fn find_condition<'a>(
conditions: &'a [Condition],
condition_type: &str,
) -> Option<&'a Condition>Expand description
Find a condition by type in a list of conditions.
This is a convenience function for finding a specific condition type in a resource’s status conditions.
§Arguments
conditions- The list of conditions to searchcondition_type- The type of condition to find (e.g., “Ready”)
§Returns
The matching condition if found, otherwise None.
§Example
let conditions = vec![]; // From resource status
if let Some(ready_condition) = find_condition(&conditions, "Ready") {
println!("Ready status: {}", ready_condition.status);
}