jsonrpc-derive 18.0.0

High level, typed wrapper for `jsonrpc-core`
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#[macro_use]
extern crate jsonrpc_derive;
extern crate jsonrpc_core;
extern crate jsonrpc_pubsub;

#[rpc]
pub trait Rpc {
	type Metadata;

	// note that a subscribe method is missing

	/// Unsubscribe from hello subscription.
	#[pubsub(subscription = "hello", unsubscribe, name = "hello_unsubscribe")]
	fn unsubscribe(&self, _: Option<Self::Metadata>, _: SubscriptionId) -> Result<bool>;
}

fn main() {}