Function bdrck_params::parse_and_execute::parse_and_execute
[−]
[src]
pub fn parse_and_execute<E>(
program: &str,
parameters: &[String],
command: ExecutableCommand<E>
) -> Result<CommandResult<E>>
This function parses the given program parameters and calls the given command's 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 single-command programs.