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