Function bdrck_params::parse_and_execute::parse_and_execute_command
[−]
[src]
pub fn parse_and_execute_command<E>(program: &str,
parameters: &[String],
commands: Vec<ExecutableCommand<E>>)
-> Result<CommandResult<E>>
This function parses the given program parameters, and calls the appropriate command callback. It prints out usage information if the parameters are invalid, and returns a reasonable exit code for the process.
This is the function which should be used for typical multi-command programs.