Extract RPC definitions from RPC crate. (#3502)

* Extract author API from the substrate-rpc crate.

* Split out API from RPC.

* Clean up naming.

* Fix tests.

* Shorten error translations.

* Update Cargo.lock
This commit is contained in:
Tomasz Drwięga
2019-08-29 10:32:55 +02:00
committed by Svyatoslav Nikolsky
parent 4ff97bd856
commit 98f64b6b93
28 changed files with 621 additions and 409 deletions
+2 -2
View File
@@ -18,7 +18,7 @@
use std::sync::Arc;
use jsonrpc_pubsub::{Session, PubSubMetadata};
use crate::rpc::futures::sync::mpsc;
use rpc::futures::sync::mpsc;
/// RPC Metadata.
///
@@ -30,7 +30,7 @@ pub struct Metadata {
session: Option<Arc<Session>>,
}
impl crate::rpc::Metadata for Metadata {}
impl rpc::Metadata for Metadata {}
impl PubSubMetadata for Metadata {
fn session(&self) -> Option<Arc<Session>> {
self.session.clone()