pub struct AsyncJob<Tz = Local, Tp = ChronoTimeProvider>where
Tz: TimeZone,
Tp: TimeProvider,{ /* private fields */ }
Expand description
An asynchronous job to run on the scheduler.
Create these by calling AsyncScheduler::every()
.
Methods for scheduling the job live in the Job trait.
Implementations
sourceimpl<Tz, Tp> AsyncJob<Tz, Tp>where
Tz: TimeZone + Sync + Send,
Tp: TimeProvider,
impl<Tz, Tp> AsyncJob<Tz, Tp>where
Tz: TimeZone + Sync + Send,
Tp: TimeProvider,
Trait Implementations
sourceimpl<Tz, Tp> Debug for AsyncJob<Tz, Tp>where
Tz: TimeZone,
Tp: TimeProvider,
impl<Tz, Tp> Debug for AsyncJob<Tz, Tp>where
Tz: TimeZone,
Tp: TimeProvider,
sourceimpl<Tz, Tp> Job<Tz, Tp> for AsyncJob<Tz, Tp>where
Tz: TimeZone + Sync + Send,
Tp: TimeProvider,
impl<Tz, Tp> Job<Tz, Tp> for AsyncJob<Tz, Tp>where
Tz: TimeZone + Sync + Send,
Tp: TimeProvider,
sourcefn at(&mut self, time: &str) -> &mut Self
fn at(&mut self, time: &str) -> &mut Self
Specify the time of day when a task should run, e.g. Read more
sourcefn plus(&mut self, ival: Interval) -> &mut Self
fn plus(&mut self, ival: Interval) -> &mut Self
Specifies an offset to when a task should run, e.g. Read more
sourcefn and_every(&mut self, ival: Interval) -> &mut Self
fn and_every(&mut self, ival: Interval) -> &mut Self
Add an additional scheduling to the task. All schedules will be considered when determining
when the task should next run. Read more
sourcefn repeating_every(&mut self, interval: Interval) -> Repeating<'_, Self, Tz, Tp>
fn repeating_every(&mut self, interval: Interval) -> Repeating<'_, Self, Tz, Tp>
After running once, run again with the specified interval. Read more
sourcefn is_pending(&self, now: &DateTime<Tz>) -> bool
fn is_pending(&self, now: &DateTime<Tz>) -> bool
Test whether a job is scheduled to run again. This is usually only called by
Scheduler::run_pending(). Read more
Auto Trait Implementations
impl<Tz = Local, Tp = ChronoTimeProvider> !RefUnwindSafe for AsyncJob<Tz, Tp>
impl<Tz, Tp> Send for AsyncJob<Tz, Tp>where
Tp: Send,
Tz: Send,
<Tz as TimeZone>::Offset: Send,
impl<Tz = Local, Tp = ChronoTimeProvider> !Sync for AsyncJob<Tz, Tp>
impl<Tz, Tp> Unpin for AsyncJob<Tz, Tp>where
Tp: Unpin,
Tz: Unpin,
<Tz as TimeZone>::Offset: Unpin,
impl<Tz = Local, Tp = ChronoTimeProvider> !UnwindSafe for AsyncJob<Tz, Tp>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more