Function squid::command_line::parse_arguments
[−]
[src]
pub fn parse_arguments() -> Result<Arguments, ParseError>
Parses command line arguments.
Errors
Err(ParsingError::OnlyHelpRequested)
when the application
was invoked with --help
, as this nullifies the need to parse any other
arguments or to resume program execution.
Err(ParsingError::InvalidArguments)
when one or more arguments
supplied have an invalid form.
Err(ParsingError::Unknown)
when the error that has occurred could
not be identified. This error type exists for the sake of completion, but
it is not expected for you to ever encounter it.
Examples
Parse arguments:
if let Ok(arguments) = parse_arguments() { println!("Arguments parsed: {:?}", arguments); }