[][src]Trait web3::BatchTransport

pub trait BatchTransport: Transport {
    type Batch: Future<Output = Result<Vec<Result<Value>>>>;
    fn send_batch<T>(&self, requests: T) -> Self::Batch
    where
        T: IntoIterator<Item = (RequestId, Call)>
; }

A transport implementation supporting batch requests.

Associated Types

type Batch: Future<Output = Result<Vec<Result<Value>>>>

The type of future this transport returns when a call is made.

Loading content...

Required methods

fn send_batch<T>(&self, requests: T) -> Self::Batch where
    T: IntoIterator<Item = (RequestId, Call)>, 

Sends a batch of prepared RPC calls.

Loading content...

Implementors

impl BatchTransport for Http[src]

type Batch = Response<fn(_: Vec<u8>) -> Result<Vec<Result<Value>>>>

impl BatchTransport for WebSocket[src]

type Batch = Response<Vec<Result<Value>>, fn(_: Result<Vec<Result<Value>>>) -> Result<Vec<Result<Value>>>>

impl<A, B, ABatch, BBatch> BatchTransport for Either<A, B> where
    A: BatchTransport<Batch = ABatch>,
    B: BatchTransport<Batch = BBatch>,
    A::Out: 'static + Send,
    B::Out: 'static + Send,
    ABatch: Future<Output = Result<Vec<Result<Value>>>> + 'static + Send,
    BBatch: Future<Output = Result<Vec<Result<Value>>>> + 'static + Send
[src]

type Batch = BoxFuture<'static, Result<Vec<Result<Value>>>>

impl<X, T: ?Sized> BatchTransport for X where
    T: BatchTransport,
    X: Deref<Target = T>,
    X: Debug,
    X: Clone
[src]

type Batch = T::Batch

Loading content...