Macro rpc_toolkit::run_cli
source · [−]run_cli!() { /* proc-macro */ }Expand description
run_cli!(command, app_mutator, make_ctx, exit_fn)
- this function does not return
command: path to an rpc command (with the#[command]attribute)app_mutator(optional): an expression that returns a mutated app.- example:
app => app.arg(Arg::with_name("port").long("port")) - default:
app => app
- example:
make_ctx(optional): an expression that takes &ArgMatches and returns the Context used bycommand.- example:
matches => matches.value_of("port") - default:
matches => matches
- example:
exit_fn(optional): a function that takes a JSON RPC error code (i32) and returns an Exit code (i32)- default:
|code| code
- default: