JsonRpcProviderType

Trait JsonRpcProviderType 

Source
pub trait JsonRpcProviderType<T: Target>: ProviderType<T> {
    // Required methods
    fn batch<U: DeserializeOwned>(
        &self,
        targets: Vec<T>,
    ) -> impl Future<Output = Result<Vec<JsonRpcResult<U>>, JsonRpcError>>;
    fn batch_chunk_by<U: DeserializeOwned>(
        &self,
        targets: Vec<T>,
        chunk_size: usize,
    ) -> impl Future<Output = Result<Vec<JsonRpcResult<U>>, JsonRpcError>>;
}

Required Methods§

Source

fn batch<U: DeserializeOwned>( &self, targets: Vec<T>, ) -> impl Future<Output = Result<Vec<JsonRpcResult<U>>, JsonRpcError>>

batch isomorphic JSON-RPC requests

Source

fn batch_chunk_by<U: DeserializeOwned>( &self, targets: Vec<T>, chunk_size: usize, ) -> impl Future<Output = Result<Vec<JsonRpcResult<U>>, JsonRpcError>>

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§