Skip to main content

hyperlane_plugin_scheduler/
trait.rs

1use super::*;
2
3/// Async background job handler trait executed by [`Scheduler`].
4pub trait JobHandler: Send + Sync + 'static {
5    /// Executes one scheduled invocation of the job.
6    ///
7    /// # Returns
8    ///
9    /// - `Pin<Box<dyn Future<Output = Result<(), String>> + Send>>` - Async execution future.
10    fn run(&self) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send>>;
11}