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

Method is_set

option_parser/src/lib.rs:260–265  ·  view source on GitHub ↗

Returns `true` if the option was present in the parsed input. This works for both value-requiring and valueless options.

(&self, option: &str)

Source from the content-addressed store, hash-verified

258 ///
259 /// This works for both value-requiring and valueless options.
260 pub fn is_set(&self, option: &str) -> bool {
261 self.options
262 .get(option)
263 .and_then(|v| v.value.as_ref())
264 .is_some()
265 }
266
267 /// Retrieves and converts an option value to type `T`.
268 ///

Callers 2

start_vmmFunction · 0.80
parseMethod · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected