rpc_assoc_items.rs 411 B
Newer Older
Igor Aleksanov's avatar
Igor Aleksanov committed
use jsonrpsee::proc_macros::rpc;

// Associated items are forbidden.
#[rpc(client, server)]
pub trait AssociatedConst {
	const WOO: usize;

	#[method(name = "foo")]
	async fn async_method(&self) -> jsonrpsee::types::JsonRpcResult<u8>;
Igor Aleksanov's avatar
Igor Aleksanov committed
}

#[rpc(client, server)]
pub trait AssociatedType {
	type Woo;

	#[method(name = "foo")]
	async fn async_method(&self) -> jsonrpsee::types::JsonRpcResult<u8>;
Igor Aleksanov's avatar
Igor Aleksanov committed
}

fn main() {}