Struct bitcoinrpc_server::RPCTable
source · pub struct RPCTable { /* private fields */ }
Expand description
| RPC command dispatcher. |
Implementations§
source§impl RPCTable
impl RPCTable
pub fn help(&self, str_command: &String, helpreq: &JSONRPCRequest) -> String
source§impl RPCTable
impl RPCTable
sourcepub fn append_command(&mut self, name: &String, pcmd: *const RPCCommand)
pub fn append_command(&mut self, name: &String, pcmd: *const RPCCommand)
| Appends a CRPCCommand to the dispatch | table. | | Precondition: RPC server is not running | | Commands with different method names | but the same unique_id will be considered | aliases, and only the first registered | method name will show up in the help text | command listing. Aliased commands | do not have to have the same behavior. | Server and client code can distinguish | between calls based on method name, | and aliased commands can also register | different names, types, and numbers | of parameters. |
pub fn remove_command(&mut self, name: &String, pcmd: *const RPCCommand) -> bool
source§impl RPCTable
impl RPCTable
sourcepub fn execute(&self, request: &JSONRPCRequest) -> UniValue
pub fn execute(&self, request: &JSONRPCRequest) -> UniValue
| Execute a method. | | ———– | @param request | | The JSONRPCRequest to execute | | ———– | @return | | Result of the call. @throws an exception | (UniValue) when an error happens. |
sourcepub fn list_commands(&self) -> Vec<String>
pub fn list_commands(&self) -> Vec<String>
| Returns a list of registered commands | | ———– | @return | | List of registered commands. |
sourcepub fn dump_arg_map(&self, args_request: &JSONRPCRequest) -> UniValue
pub fn dump_arg_map(&self, args_request: &JSONRPCRequest) -> UniValue
| Return all named arguments that need | to be converted by the client from string | to another JSON type |