Registry / other / jsonrpc-derive

jsonrpc-derive

JSON →
library18.0.0rscratesunverified

Procedural macro for deriving JSON-RPC client and server implementations.

# Cargo.toml [dependencies] jsonrpc-derive = "18.0.0"
INSTALL
IMPORT
SIG · JSONRPC-DERIVE
J
jsonrpc-derive
otherrustv18.0.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

rpc
use jsonrpc_derive::rpc;

Defines a JSON-RPC trait using the derive macro.

use jsonrpc_derive::rpc; #[rpc] pub trait Rpc { #[rpc(name = "hello")] fn hello(&self, name: String) -> Result<String, jsonrpc_core::Error>; } fn main() { println!("RPC trait defined"); }
Debug
Known issues
gotchaRequires `jsonrpc-core` as a dependency for the generated code.
fix
Add `jsonrpc-core` to your Cargo.toml.
affects: >=18.0.0
Upgrade
Version history
18.0.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
jsonrpc-derive — cargo add jsonrpc-derive · libregistry