Trait ExecutableTxTuple
pub trait ExecutableTxTuple:
Into<(Self::IntoIter, Self::Convert)>
+ 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> + Send + 'static
where <Self::IntoIter as IntoParallelIterator>::Iter: IndexedParallelIterator;
type Convert: Fn(Self::RawTx) -> Result<Self::Tx, Self::Error> + Send + Sync + 'static;
}std only.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§
type 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.
type Error: Error + Send + Sync + 'static
type Error: Error + Send + Sync + 'static
Errors that may occur while recovering or decoding transactions.
type IntoIter: IntoParallelIterator<Item = Self::RawTx> + Send + 'static
where
<Self::IntoIter as IntoParallelIterator>::Iter: IndexedParallelIterator
type IntoIter: IntoParallelIterator<Item = Self::RawTx> + Send + 'static where <Self::IntoIter as IntoParallelIterator>::Iter: IndexedParallelIterator
Iterator over ExecutableTxTuple::Tx.
type Convert: Fn(Self::RawTx) -> Result<Self::Tx, Self::Error> + Send + Sync + 'static
type Convert: Fn(Self::RawTx) -> Result<Self::Tx, Self::Error> + Send + Sync + 'static
Closure 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.
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.