MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / parse

Method parse

option_parser/src/lib.rs:164–166  ·  view source on GitHub ↗

Parses a comma-separated `key=value` string, updating registered options. Returns an error if the input contains an unknown option name, has unbalanced quotes or brackets, or a value-requiring option lacks `=`.

(&mut self, input: &str)

Source from the content-addressed store, hash-verified

162 /// Returns an error if the input contains an unknown option name, has
163 /// unbalanced quotes or brackets, or a value-requiring option lacks `=`.
164 pub fn parse(&mut self, input: &str) -> OptionParserResult<()> {
165 self.parse_inner(input, false)
166 }
167
168 /// Like [`parse`](Self::parse), but silently ignores unknown option names.
169 ///

Callers 11

from_strMethod · 0.45
test_option_parserFunction · 0.45
test_empty_inputFunction · 0.45
test_add_allFunction · 0.45
test_add_valuelessFunction · 0.45
test_convert_integerFunction · 0.45
test_toggleFunction · 0.45
test_toggle_invalidFunction · 0.45
test_byte_sizedFunction · 0.45

Calls 1

parse_innerMethod · 0.80

Tested by 10

test_option_parserFunction · 0.36
test_empty_inputFunction · 0.36
test_add_allFunction · 0.36
test_add_valuelessFunction · 0.36
test_convert_integerFunction · 0.36
test_toggleFunction · 0.36
test_toggle_invalidFunction · 0.36
test_byte_sizedFunction · 0.36