WorkerInner

Trait WorkerInner 

Source
pub trait WorkerInner<Owner, ExtIn, ExtOut, ChannelId, Event, ICfg, SCfg> {
    // Required methods
    fn build(worker: u16, cfg: ICfg) -> Self;
    fn worker_index(&self) -> u16;
    fn tasks(&self) -> usize;
    fn is_empty(&self) -> bool;
    fn spawn(&mut self, now: Instant, cfg: SCfg);
    fn on_tick(&mut self, now: Instant);
    fn on_event(
        &mut self,
        now: Instant,
        event: WorkerInnerInput<Owner, ExtIn, ChannelId, Event>,
    );
    fn on_shutdown(&mut self, now: Instant);
    fn pop_output(
        &mut self,
        now: Instant,
    ) -> Option<WorkerInnerOutput<Owner, ExtOut, ChannelId, Event, SCfg>>;
}

Required Methods§

Source

fn build(worker: u16, cfg: ICfg) -> Self

Source

fn worker_index(&self) -> u16

Source

fn tasks(&self) -> usize

Source

fn is_empty(&self) -> bool

Source

fn spawn(&mut self, now: Instant, cfg: SCfg)

Source

fn on_tick(&mut self, now: Instant)

Source

fn on_event( &mut self, now: Instant, event: WorkerInnerInput<Owner, ExtIn, ChannelId, Event>, )

Source

fn on_shutdown(&mut self, now: Instant)

Source

fn pop_output( &mut self, now: Instant, ) -> Option<WorkerInnerOutput<Owner, ExtOut, ChannelId, Event, SCfg>>

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§