(input: &str)
| 11 | }; |
| 12 | |
| 13 | pub fn parse_cpu_definition(input: &str) -> anyhow::Result<ResourceDescriptorKind> { |
| 14 | if let Ok(num) = input.parse::<u32>() { |
| 15 | return Ok(ResourceDescriptorKind::simple_indices(num)); |
| 16 | } |
| 17 | all_consuming(parse_resource_kind()).parse_text(input) |
| 18 | } |
| 19 | |
| 20 | /// Parses an individual resource label. |
| 21 | /// The label has to be wrapped in quotes if it needs to contain `[`, `]`, `,` or whitespace. |