pub trait ScheduleExt {
// Required methods
fn job<J: Job + Clone>(&mut self, job: J) -> &mut ScheduledTask;
fn command(
&mut self,
console: Arc<Console>,
name: impl Into<String>,
) -> &mut ScheduledTask;
fn command_with(
&mut self,
console: Arc<Console>,
name: impl Into<String>,
argv: impl IntoIterator<Item = impl Into<String>>,
) -> &mut ScheduledTask;
}Expand description
job and command, on top of Schedule.
An extension trait rather than methods on Schedule, because the scheduler
crate would otherwise have to depend on the queue and the console — and then
an application with neither would compile both.
Required Methods§
Sourcefn job<J: Job + Clone>(&mut self, job: J) -> &mut ScheduledTask
fn job<J: Job + Clone>(&mut self, job: J) -> &mut ScheduledTask
Dispatch a queued job on a schedule.
Sourcefn command(
&mut self,
console: Arc<Console>,
name: impl Into<String>,
) -> &mut ScheduledTask
fn command( &mut self, console: Arc<Console>, name: impl Into<String>, ) -> &mut ScheduledTask
Run a console command on a schedule.
Sourcefn command_with(
&mut self,
console: Arc<Console>,
name: impl Into<String>,
argv: impl IntoIterator<Item = impl Into<String>>,
) -> &mut ScheduledTask
fn command_with( &mut self, console: Arc<Console>, name: impl Into<String>, argv: impl IntoIterator<Item = impl Into<String>>, ) -> &mut ScheduledTask
Run a console command with arguments.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".