Skip to main content

Schedule

Trait Schedule 

Source
pub trait Schedule<M = ()>: Sealed<M> {
    // Required method
    fn schedule(&self, runnable: Runnable<M>, info: ScheduleInfo);
}
Expand description

The trait for scheduling functions.

Required Methods§

Source

fn schedule(&self, runnable: Runnable<M>, info: ScheduleInfo)

The actual scheduling procedure.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<M, F> Schedule<M> for F
where F: Fn(Runnable<M>),

Source§

impl<M, F> Schedule<M> for WithInfo<F>
where F: Fn(Runnable<M>, ScheduleInfo),