ic_web3_rs

Trait BatchTransport

Source
pub trait BatchTransport: Transport {
    type Batch: Future<Output = Result<Vec<Result<Value>>>>;

    // Required method
    fn send_batch<T>(&self, requests: T) -> Self::Batch
       where T: IntoIterator<Item = (RequestId, Call)>;
}
Expand description

A transport implementation supporting batch requests.

Required Associated Types§

Source

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

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

Required Methods§

Source

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

Sends a batch of prepared RPC calls.

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§

Source§

impl BatchTransport for ICHttp

Source§

type Batch = Pin<Box<dyn Future<Output = Result<Vec<Result<Value, Error>>, Error>> + Send>>

Source§

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,

Source§

type Batch = Pin<Box<dyn Future<Output = Result<Vec<Result<Value, Error>>, Error>> + Send>>

Source§

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