MCPcopy Index your code
hub / github.com/cloud-hypervisor/cloud-hypervisor / add_valueless

Method add_valueless

option_parser/src/lib.rs:217–227  ·  view source on GitHub ↗

Registers a flag-style option that does not take a value. When this option appears in the input string (without `=`), it is marked as set. Use [`is_set`](Self::is_set) to query it.

(&mut self, option: &str)

Source from the content-addressed store, hash-verified

215 /// When this option appears in the input string (without `=`), it is
216 /// marked as set. Use [`is_set`](Self::is_set) to query it.
217 pub fn add_valueless(&mut self, option: &str) -> &mut Self {
218 self.options.insert(
219 option.to_owned(),
220 OptionParserValue {
221 value: None,
222 requires_value: false,
223 },
224 );
225
226 self
227 }
228
229 /// Registers multiple flag-style options that do not take a value.
230 ///

Callers 3

add_all_valuelessMethod · 0.80
test_add_valuelessFunction · 0.80
parseMethod · 0.80

Calls 1

insertMethod · 0.45

Tested by 1

test_add_valuelessFunction · 0.64