Struct lightspeed_scheduler::job::Job
source · pub struct Job { /* private fields */ }
Implementations§
source§impl Job
impl Job
pub fn new<G: Into<String>, N: Into<String>, F: 'static + Send + Sync + Fn() -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + Send + Sync>>> + Send>>>( group: G, name: N, retries_after_failure: Option<u64>, function: F, ) -> Self
sourcepub async fn is_running(&self) -> bool
pub async fn is_running(&self) -> bool
Returns true if this job is currently running.
pub fn name(&self) -> &str
pub fn group(&self) -> &str
sourcepub async fn run(&self) -> Result<(), SchedulerError>
pub async fn run(&self) -> Result<(), SchedulerError>
Run the job immediately and re-schedule it.
Auto Trait Implementations§
impl !Freeze for Job
impl !RefUnwindSafe for Job
impl Send for Job
impl Sync for Job
impl Unpin for Job
impl !UnwindSafe for Job
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more