[][src]Trait async_jsonrpc_client::Transport

pub trait Transport {
    fn prepare<M: Into<String>>(
        &self,
        method: M,
        params: Params
    ) -> (RequestId, Call);
#[must_use] fn execute<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: RequestId,
        request: &'life1 Request
    ) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; #[must_use] fn send<'life0, 'async_trait, M, T>(
        &'life0 self,
        method: M,
        params: Params
    ) -> Pin<Box<dyn Future<Output = Result<T>> + Send + 'async_trait>>
    where
        M: Into<String> + Send,
        T: DeserializeOwned,
        M: 'async_trait,
        T: 'async_trait,
        'life0: 'async_trait,
        Self: Sync + 'async_trait
, { ... } }

Transport implementation.

Required methods

fn prepare<M: Into<String>>(
    &self,
    method: M,
    params: Params
) -> (RequestId, Call)

Prepare serializable RPC call for given method with parameters.

#[must_use]fn execute<'life0, 'life1, 'async_trait>(
    &'life0 self,
    id: RequestId,
    request: &'life1 Request
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 

Execute prepared RPC call.

Loading content...

Provided methods

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

Send remote method with given parameters.

Loading content...

Implementors

impl Transport for HttpTransport[src]

impl Transport for WebSocketTransport[src]

Loading content...