mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 04:41:02 +00:00
Convert to jsonrpc-derive, use jsonrpc-* from crates.io (#1679)
* use local version of jsonrpc to test * Convert rpcs to test out in progress jsonrpc-derive api * Revert "Convert rpcs to test out in progress jsonrpc-derive api" This reverts commit 69231784171180d9bdb1bde1fcfd20f233357b17. * Convert to new jsonrpc-derive macro * Add RPC trait Metadata comment * Break up long pubsub attr lines * Update to 10.0.1 jsonrpc-* from crates.io * Remove typed::Subscriber prefixes * Remove empty comment
This commit is contained in:
committed by
Bastian Köcher
parent
57ac31a0aa
commit
822c7ded45
@@ -17,8 +17,7 @@
|
||||
use std::collections::HashMap;
|
||||
use std::sync::{Arc, atomic::{self, AtomicUsize}};
|
||||
|
||||
use jsonrpc_macros::pubsub;
|
||||
use jsonrpc_pubsub::SubscriptionId;
|
||||
use jsonrpc_pubsub::{SubscriptionId, typed::{Sink, Subscriber}};
|
||||
use parking_lot::Mutex;
|
||||
use rpc::futures::sync::oneshot;
|
||||
use rpc::futures::{Future, future};
|
||||
@@ -72,8 +71,8 @@ impl Subscriptions {
|
||||
/// Second parameter is a function that converts Subscriber sink into a future.
|
||||
/// This future will be driven to completion bu underlying event loop
|
||||
/// or will be cancelled in case #cancel is invoked.
|
||||
pub fn add<T, E, G, R, F>(&self, subscriber: pubsub::Subscriber<T, E>, into_future: G) where
|
||||
G: FnOnce(pubsub::Sink<T, E>) -> R,
|
||||
pub fn add<T, E, G, R, F>(&self, subscriber: Subscriber<T, E>, into_future: G) where
|
||||
G: FnOnce(Sink<T, E>) -> R,
|
||||
R: future::IntoFuture<Future=F, Item=(), Error=()>,
|
||||
F: future::Future<Item=(), Error=()> + Send + 'static,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user