Trait Transport

Source
pub trait Transport {
    type Error: Error;

    // Required method
    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 + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

A JSON-RPC 2.0 transport.

Required Associated Types§

Source

type Error: Error

The transport error type.

Required Methods§

Source

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 + 'async_trait, Self: 'async_trait, 'life0: 'async_trait,

Send a RPC call with the given method and parameters.

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§