(&mut self, job: Job, func: impl FnOnce() -> JobState)
| 43 | /// Adds a job to the queue if a job of the given kind is not already running. |
| 44 | #[inline] |
| 45 | pub fn push_once(&mut self, job: Job, func: impl FnOnce() -> JobState) { |
| 46 | if !self.is_running(job) { |
| 47 | self.push(func()); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | /// Returns whether a job of the given kind is running. |
| 52 | pub fn is_running(&self, kind: Job) -> bool { |
no test coverage detected