Skip to main content

parse_args

Function parse_args 

Source
pub fn parse_args<C: SubCommands>(
    args: &[impl AsRef<str>],
) -> Result<C, ExecutionResult>
Expand description

Parses a slice of argument strings into the subcommand type C.

On --help or syntax error, returns an Err(ExecutionResult) ready to be sent back to the caller.