Skip to main content

DelayedWorkFactory

Trait DelayedWorkFactory 

Source
pub trait DelayedWorkFactory<TickInput, Context>
where Context: WorkContextProvider,
{ type Item<Work: ScheduledOnceWork<TickInput, Context>>: 'static + ScheduledWork<Tick = TickInput, WorkContextProvider = Context> + Send + Sync; // Required method fn new<Work>(work: Work, delay: Duration) -> Self::Item<Work> where Work: ScheduledOnceWork<TickInput, Context>; }

Required Associated Types§

Source

type Item<Work: ScheduledOnceWork<TickInput, Context>>: 'static + ScheduledWork<Tick = TickInput, WorkContextProvider = Context> + Send + Sync

Required Methods§

Source

fn new<Work>(work: Work, delay: Duration) -> Self::Item<Work>
where Work: ScheduledOnceWork<TickInput, Context>,

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.

Implementations on Foreign Types§

Source§

impl<C> DelayedWorkFactory<Tick, C> for TickedDelayedOnceWorkFactory<C>
where C: 'static + WorkContextProvider + Send + Sync,

Source§

type Item<Work: ScheduledOnceWork<Tick, C>> = TickedDelayedOnceWork<Work, C>

Source§

fn new<Work>( work: Work, delay: Duration, ) -> <TickedDelayedOnceWorkFactory<C> as DelayedWorkFactory<Tick, C>>::Item<Work>
where Work: ScheduledOnceWork<Tick, C>,

Implementors§