Trait async_jsonrpc_client::Transport[][src]

pub trait Transport {
    type Error: Error;
#[must_use]    fn request<'life0, 'async_trait, M>(
        &'life0 self,
        method: M,
        params: Option<Params>
    ) -> Pin<Box<dyn Future<Output = Result<Output, Self::Error>> + Send + 'async_trait>>
    where
        M: Into<String> + Send,
        M: 'async_trait,
        'life0: 'async_trait,
        Self: 'async_trait
; }

A JSON-RPC 2.0 transport.

Associated Types

type Error: Error[src]

The transport error type.

Loading content...

Required methods

#[must_use]fn request<'life0, 'async_trait, M>(
    &'life0 self,
    method: M,
    params: Option<Params>
) -> Pin<Box<dyn Future<Output = Result<Output, Self::Error>> + Send + 'async_trait>> where
    M: Into<String> + Send,
    M: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Send a RPC call with the given method and parameters.

Loading content...

Implementors

impl Transport for HttpClient[src]

type Error = HttpClientError

impl Transport for WsClient[src]

type Error = WsClientError

Loading content...