Skip to main content

RepeatedTaskFactory

Trait RepeatedTaskFactory 

Source
pub trait RepeatedTaskFactory<TickInput, Context>
where Context: WorkContextProvider,
{ type Item<Work: ScheduledRepeatedWork<TickInput, Context>>: 'static + ScheduledWork<Tick = TickInput, WorkContextProvider = Context> + Send + Sync; // 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: ScheduledRepeatedWork<TickInput, Context>>: 'static + ScheduledWork<Tick = TickInput, WorkContextProvider = Context> + Send + Sync

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.

Implementations on Foreign Types§

Source§

impl<C> RepeatedTaskFactory<Tick, C> for TickedRepeatingWorkFactory<C>
where C: 'static + WorkContextProvider,

Source§

type Item<Work: ScheduledRepeatedWork<Tick, C>> = TickedRepeatingWork<Work, C>

Source§

fn new<Work>( work: Work, interval: Duration, start_immediately: bool, max_work_per_tick: NonZero<usize>, ) -> <TickedRepeatingWorkFactory<C> as RepeatedTaskFactory<Tick, C>>::Item<Work>
where Work: ScheduledRepeatedWork<Tick, C>,

Implementors§