pub trait Scheduler: Send + Sync {
// Required methods
fn schedule(&self, job: Job) -> Result<String>;
fn list(&self) -> Vec<Job>;
fn cancel(&self, id: &str) -> Result<()>;
fn get(&self, id: &str) -> Option<Job>;
fn tick<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<Job>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Required Methods§
fn schedule(&self, job: Job) -> Result<String>
fn list(&self) -> Vec<Job>
fn cancel(&self, id: &str) -> Result<()>
fn get(&self, id: &str) -> Option<Job>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".