(&self)
| 198 | } |
| 199 | |
| 200 | fn possible_values(&self) -> Option<Box<dyn Iterator<Item = PossibleValue> + '_>> { |
| 201 | let values = ResourceDetectComponent::value_variants() |
| 202 | .iter() |
| 203 | .filter_map(|v| v.to_possible_value()); |
| 204 | Some(Box::new( |
| 205 | [ |
| 206 | PossibleValue::new("all").help("Detect all known resources"), |
| 207 | PossibleValue::new("none").help("Do not detect any resources"), |
| 208 | ] |
| 209 | .into_iter() |
| 210 | .chain(values), |
| 211 | )) |
| 212 | } |
| 213 | } |
| 214 | |
| 215 | /// A single resource type that can be detected from the worker environment |