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;
// 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>,
) -> impl Future<Output = ()> + Send + 'a;
// Provided method
fn generate_new_address(data: Self::InitData) -> ExecutorAddress { ... }
}
Required Associated Types§
type InputPacket: Send + Sync + 'static
type OutputPacket: PacketTrait + Send + Sync + 'static
type GlobalParams: Send + Sync + 'static
type InitData: Send + Sync + Clone + 'static
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>, ) -> impl Future<Output = ()> + Send + 'a
Provided Methods§
fn generate_new_address(data: Self::InitData) -> ExecutorAddress
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.