MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / parse_cpu_definition

Function parse_cpu_definition

crates/hyperqueue/src/worker/parser.rs:13–18  ·  view source on GitHub ↗
(input: &str)

Source from the content-addressed store, hash-verified

11};
12
13pub 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.

Callers 2

test_parse_cpu_list_kindFunction · 0.85

Calls 3

all_consumingFunction · 0.85
parse_resource_kindFunction · 0.85
parse_textMethod · 0.80

Tested by 2

test_parse_cpu_list_kindFunction · 0.68