pub trait AsyncExecutor: Sized + Send + Sync + 'static {
type InputPacket: Send + Sync + 'static;
type OutputPacket: PacketTrait + Send + Sync + 'static;
type GlobalParams: Send + Sync + 'static;
type InitData: Send + Sync + Clone + 'static;
type AsyncExecutorFuture<'a>: Future<Output = ()> + Send + 'a;
// Required methods
fn new() -> Self;
fn async_executor_main<'a>(
&'a mut self,
global_params: &'a Self::GlobalParams,
receiver: ExecutorReceiver<Self>,
memory_tracker: MemoryTracker<Self>
) -> Self::AsyncExecutorFuture<'a>;
// Provided method
fn generate_new_address(data: Self::InitData) -> ExecutorAddress { ... }
}