[][src]Trait jsonrpc::client::Transport

pub trait Transport: Send + Sync + 'static {
#[must_use]    pub fn send_request<'life0, 'life1, 'async_trait>(
        &'life0 self,
        r: Request<'life1>
    ) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
#[must_use] pub fn send_batch<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        rs: &'life1 [Request<'life2>]
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Response>, Error>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        'life2: 'async_trait,
        Self: 'async_trait
;
pub fn fmt_target(&self, f: &mut Formatter<'_>) -> Result; }

An interface for a transport over which to use the JSONRPC protocol.

Required methods

#[must_use]pub fn send_request<'life0, 'life1, 'async_trait>(
    &'life0 self,
    r: Request<'life1>
) -> Pin<Box<dyn Future<Output = Result<Response, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Send an RPC request over the transport.

#[must_use]pub fn send_batch<'life0, 'life1, 'life2, 'async_trait>(
    &'life0 self,
    rs: &'life1 [Request<'life2>]
) -> Pin<Box<dyn Future<Output = Result<Vec<Response>, Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    'life2: 'async_trait,
    Self: 'async_trait, 
[src]

Send a batch of RPC requests over the transport.

pub fn fmt_target(&self, f: &mut Formatter<'_>) -> Result[src]

Format the target of this transport. I.e. the URL/socket/...

Loading content...

Implementors

impl Transport for SimpleHttpTransport[src]

Loading content...