RpcDispatchExt

Trait RpcDispatchExt 

Source
pub trait RpcDispatchExt: TransportTrait + TransportExt {
    // Provided method
    fn dispatch_json<R: DeserializeOwned>(
        &self,
        method: &str,
        params: &[Value],
    ) -> impl Future<Output = Result<R, TransportError>> + Send { ... }
}
Expand description

Helper to route calls to the node or wallet namespace automatically.

Provided Methods§

Source

fn dispatch_json<R: DeserializeOwned>( &self, method: &str, params: &[Value], ) -> impl Future<Output = Result<R, TransportError>> + Send

Dispatch JSON-RPC methods by name.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§