corepc_client/client_sync/v18/control.rs
1//! Macros for implementing JSON-RPC methods on a client.
2//!
3//! Specifically this is methods found under the `== Control ==` section of the
4//! API docs of Bitcoin Core `v0.18`.
5//!
6//! All macros require `Client` to be in scope.
7//!
8//! See or use the `define_jsonrpc_minreq_client!` macro to define a `Client`.
9
10/// Implements Bitcoin Core JSON-RPC API method `getrpcinfo`.
11#[macro_export]
12macro_rules! impl_client_v18__get_rpc_info {
13 () => {
14 impl Client {
15 pub fn get_rpc_info(&self) -> Result<GetRpcInfo> { self.call("getrpcinfo", &[]) }
16 }
17 };
18}