pub struct SubstrateTransport { /* private fields */ }Expand description
Substrate RPC transport wrapper.
Implementations§
Source§impl SubstrateTransport
impl SubstrateTransport
pub fn new(inner: Arc<dyn RpcTransport>) -> Self
pub fn inner(&self) -> &Arc<dyn RpcTransport>
Trait Implementations§
Source§impl RpcTransport for SubstrateTransport
impl RpcTransport for SubstrateTransport
Source§fn send<'life0, 'async_trait>(
&'life0 self,
req: JsonRpcRequest,
) -> Pin<Box<dyn Future<Output = Result<JsonRpcResponse, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
req: JsonRpcRequest,
) -> Pin<Box<dyn Future<Output = Result<JsonRpcResponse, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a single JSON-RPC request and return the response.
Source§fn send_batch<'life0, 'async_trait>(
&'life0 self,
reqs: Vec<JsonRpcRequest>,
) -> Pin<Box<dyn Future<Output = Result<Vec<JsonRpcResponse>, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send_batch<'life0, 'async_trait>(
&'life0 self,
reqs: Vec<JsonRpcRequest>,
) -> Pin<Box<dyn Future<Output = Result<Vec<JsonRpcResponse>, TransportError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a batch of JSON-RPC requests. Read more
Source§fn health(&self) -> HealthStatus
fn health(&self) -> HealthStatus
Return the current health status of this transport.
Source§fn call<'life0, 'life1, 'async_trait, T>(
&'life0 self,
id: u64,
method: &'life1 str,
params: Vec<Value>,
) -> Pin<Box<dyn Future<Output = Result<T, TransportError>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned,
'life0: 'async_trait,
'life1: 'async_trait,
fn call<'life0, 'life1, 'async_trait, T>(
&'life0 self,
id: u64,
method: &'life1 str,
params: Vec<Value>,
) -> Pin<Box<dyn Future<Output = Result<T, TransportError>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
T: 'async_trait + DeserializeOwned,
'life0: 'async_trait,
'life1: 'async_trait,
Convenience: call a method and deserialize the result.
Auto Trait Implementations§
impl Freeze for SubstrateTransport
impl !RefUnwindSafe for SubstrateTransport
impl Send for SubstrateTransport
impl Sync for SubstrateTransport
impl Unpin for SubstrateTransport
impl UnsafeUnpin for SubstrateTransport
impl !UnwindSafe for SubstrateTransport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more