pub unsafe extern "C" fn aws_cli_dispatch_on_subcommand(
argc: c_int,
argv: *const *mut c_char,
dispatch_table: *mut aws_cli_subcommand_dispatch,
table_length: c_int,
user_data: *mut c_void
) -> c_int
Expand description
Dispatches the current command line arguments with a subcommand from the second input argument in argv[], if dispatch table contains a command that matches the argument. When the command is dispatched, argc and argv will be updated to reflect the new argument count. The cli options are required to come after the subcommand. If either, no dispatch was found or there was no argument passed to the program, this function will return AWS_OP_ERR. Check aws_last_error() for details on the error. @param argc number of arguments passed to int main() @param argv the arguments passed to int main() @param parse_cb, optional, specify NULL if you don’t want to handle this. This argument is for parsing “meta” commands from the command line options prior to dispatch occurring. @param dispatch_table table containing functions and command name to dispatch on. @param table_length numnber of entries in dispatch_table. @return AWS_OP_SUCCESS(0) on success, AWS_OP_ERR(-1) on failure