Skip to main content

parse_args

Function parse_args 

Source
pub fn parse_args<I, T>(args: I) -> Result<HwiRequest, HwiError>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,
Expand description

Parses command-line arguments, including the program name, into an HWI request.

Performs no device I/O, stdin reading, or response printing. Use run_cli for --stdin, password prompting, and compatible help and usage handling.

ยงErrors

Returns HwiError with code -7 for Clap parsing failures, including help requests, or the conversion error for invalid global options such as a network name (-2). Raw device types are resolved later during processing.