[−][src]Trait async_jsonrpc_client::BatchTransport
A transport implementation supporting batch requests
Provided methods
#[must_use]fn execute_batch<'life0, 'async_trait, I>(
&'life0 self,
requests: I
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
I: IntoIterator<Item = (RequestId, Call)> + Send,
I::IntoIter: Send,
I: 'async_trait,
'life0: 'async_trait,
Self: Sync + 'async_trait,
&'life0 self,
requests: I
) -> Pin<Box<dyn Future<Output = Result<Response>> + Send + 'async_trait>> where
I: IntoIterator<Item = (RequestId, Call)> + Send,
I::IntoIter: Send,
I: 'async_trait,
'life0: 'async_trait,
Self: Sync + 'async_trait,
Execute a batch of prepared RPC calls.
#[must_use]fn send_batch<'life0, 'async_trait, I, M>(
&'life0 self,
method_and_params: I
) -> Pin<Box<dyn Future<Output = Result<Vec<Result<Value>>>> + Send + 'async_trait>> where
I: IntoIterator<Item = (M, Params)> + Send,
I::IntoIter: Send,
M: Into<String>,
I: 'async_trait,
M: 'async_trait,
'life0: 'async_trait,
Self: Sync + 'async_trait,
&'life0 self,
method_and_params: I
) -> Pin<Box<dyn Future<Output = Result<Vec<Result<Value>>>> + Send + 'async_trait>> where
I: IntoIterator<Item = (M, Params)> + Send,
I::IntoIter: Send,
M: Into<String>,
I: 'async_trait,
M: 'async_trait,
'life0: 'async_trait,
Self: Sync + 'async_trait,
Send a batch of RPC calls with the given method and parameters.
#[must_use]fn send_batch_same<'life0, 'async_trait, I, M, T>(
&'life0 self,
method: M,
batch_params: I
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + Send + 'async_trait>> where
I: IntoIterator<Item = Params> + Send,
I::IntoIter: Send,
M: Into<String> + Send,
T: DeserializeOwned,
I: 'async_trait,
M: 'async_trait,
T: 'async_trait,
'life0: 'async_trait,
Self: Sync + 'async_trait,
&'life0 self,
method: M,
batch_params: I
) -> Pin<Box<dyn Future<Output = Result<Vec<T>>> + Send + 'async_trait>> where
I: IntoIterator<Item = Params> + Send,
I::IntoIter: Send,
M: Into<String> + Send,
T: DeserializeOwned,
I: 'async_trait,
M: 'async_trait,
T: 'async_trait,
'life0: 'async_trait,
Self: Sync + 'async_trait,
Send a batch of RPC calls with the same method and the given parameters. Once a request result returns an error, which will be returned directly.