pub trait ExecutableTxTuple: Send + 'static {
type RawTx: Send + Sync + 'static;
type Tx: Clone + Send + Sync + 'static;
type Error: Error + Send + Sync + 'static;
type IntoIter: IntoParallelIterator<Item = Self::RawTx> + IntoIterator<Item = Self::RawTx> + Send + 'static
where <Self::IntoIter as IntoParallelIterator>::Iter: IndexedParallelIterator;
type Convert: ConvertTx<Self::RawTx, Tx = Self::Tx, Error = Self::Error>;
// Required method
fn into_parts(self) -> (Self::IntoIter, Self::Convert);
}Expand description
A helper trait representing a pair of a “raw” transactions iterator and a closure that can be used to convert them to an executable transaction. This tuple is used in the engine to parallelize heavy work like decoding or recovery.
Required Associated Types§
Sourcetype RawTx: Send + Sync + 'static
type RawTx: Send + Sync + 'static
Raw transaction that can be converted to an ExecutableTxTuple::Tx
This can be any type that can be converted to an ExecutableTxTuple::Tx. For example,
an unrecovered transaction or just the transaction bytes.
Sourcetype Error: Error + Send + Sync + 'static
type Error: Error + Send + Sync + 'static
Errors that may occur while recovering or decoding transactions.
Sourcetype IntoIter: IntoParallelIterator<Item = Self::RawTx> + IntoIterator<Item = Self::RawTx> + Send + 'static
where
<Self::IntoIter as IntoParallelIterator>::Iter: IndexedParallelIterator
type IntoIter: IntoParallelIterator<Item = Self::RawTx> + IntoIterator<Item = Self::RawTx> + Send + 'static where <Self::IntoIter as IntoParallelIterator>::Iter: IndexedParallelIterator
Iterator over ExecutableTxTuple::Tx.
Sourcetype Convert: ConvertTx<Self::RawTx, Tx = Self::Tx, Error = Self::Error>
type Convert: ConvertTx<Self::RawTx, Tx = Self::Tx, Error = Self::Error>
Converter that can be used to convert a ExecutableTxTuple::RawTx to a
ExecutableTxTuple::Tx. This might involve heavy work like decoding or recovery
and will be parallelized in the engine.
Required Methods§
Sourcefn into_parts(self) -> (Self::IntoIter, Self::Convert)
fn into_parts(self) -> (Self::IntoIter, Self::Convert)
Decomposes into the raw transaction iterator and converter.