fn filter_by_state(&self, resource: &Resource) -> bool {
        if let Some(ref state) = resource.state {
            match state {
                // only enforce rules on resources that are in running or available state
                ResourceState::Running | ResourceState::Available => false,
                // ignore all other resource states
                _ => true,
            }
        } else {
            false
        }
    }
/// Filters a resource that is not running
Filters a resource that is not running
Filters a resource that is not running
fn filter_by_state(&self, resource: &Resource) -> bool {
        if let Some(ref state) = resource.state {
            match state {
                // only enforce rules on resources that are in running or available state
                ResourceState::Running | ResourceState::Available => false,
                // ignore all other resource states
                _ => true,
            }
        } else {
            false
        }
    }
fn filter_by_state ( & self , resource : & Resource ) -> bool { if let Some ( ref state ) = resource . state { match state { // only enforce rules on resources that are in running or available state ResourceState :: Running | ResourceState :: Available => false , // ignore all other resource states _ => true , } } else { false } }
Filters a resource that is not running
Filters a resource that is not running
&self
resource
&Resource