Trait AsyncExecutor

Source
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§

Source

type InputPacket: Send + Sync + 'static

Source

type OutputPacket: PacketTrait + Send + Sync + 'static

Source

type GlobalParams: Send + Sync + 'static

Source

type InitData: Send + Sync + Clone + 'static

Required Methods§

Source

fn new() -> Self

Source

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§

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.

Implementors§