pub trait Transport {
type Future: Future<Item = Vec<u8>, Error = Self::Error> + Send + 'static;
type Error: Error + Send + 'static;
// Required methods
fn get_next_id(&mut self) -> u64;
fn send(&self, json_data: Vec<u8>) -> Self::Future;
}
Expand description
Trait for types acting as a transport layer for the JSON-RPC 2.0 clients generated by the
jsonrpc_client
macro.
Required Associated Types§
Required Methods§
Sourcefn get_next_id(&mut self) -> u64
fn get_next_id(&mut self) -> u64
Returns an id that has not yet been used on this transport. Used by the RPC clients to fill in the “id” field of a request.