Skip to main content

parse_args_from

Function parse_args_from 

Source
pub fn parse_args_from(args: Vec<String>) -> Result<AppMode, PrompterError>
Expand description

Parse command-line arguments and return the resolved application mode.

Uses clap to parse raw arguments into a structured AppMode. The --help and --version short-circuits clap performs are mapped onto the corresponding modes rather than treated as failures.

§Errors

Returns PrompterError::ArgParse when clap rejects the arguments (unknown flags, missing required arguments, conflicting options); the payload is clap’s formatted usage text, intended for display.