Skip to main content

RepeatedTaskFactory

Trait RepeatedTaskFactory 

Source
pub trait RepeatedTaskFactory<TickInput, Context>
where Context: WorkContextProvider,
{ type Item<Work>: 'static + ScheduledWork<Tick = TickInput, WorkContextProvider = Context> + Send + Sync where Work: ScheduledRepeatedWork<TickInput, Context>; // Required method fn new<Work>( work: Work, interval: Duration, start_immediately: bool, max_work_per_tick: NonZero<usize>, ) -> Self::Item<Work> where Work: ScheduledRepeatedWork<TickInput, Context>; }

Required Associated Types§

Source

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

Required Methods§

Source

fn new<Work>( work: Work, interval: Duration, start_immediately: bool, max_work_per_tick: NonZero<usize>, ) -> Self::Item<Work>
where Work: ScheduledRepeatedWork<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.

Implementors§