Skip to main content

get_condition

Function get_condition 

Source
pub fn get_condition(resource: Option<&Resource>, typ: &str) -> Condition
Expand description

Gets the supplied status condition of the supplied resource.

A condition is always returned: if the resource is None or the condition is not present, a condition with status Unknown is returned. Accepting an Option makes it safe to pass the result of a map get directly, for example get_condition(req.observed.resources.get("bucket"), "Ready").