pub trait Scheduler: 'static {
// Required method
fn schedule<T>(
&self,
future_factory: impl FnOnce() -> T + Send + 'static
) -> Result<(), ScheduleError>
where T: Future<Output = ()> + 'static;
}
Expand description
Async/await scheduler. Can schedule a task from a future factory and a shared state.
Required Methods§
fn schedule<T>( &self, future_factory: impl FnOnce() -> T + Send + 'static ) -> Result<(), ScheduleError>
Object Safety§
This trait is not object safe.