pub struct DeltaSchedule { /* private fields */ }
Expand description
A schedule that can be used to execute tasks at regular intervals.
Implementations§
Source§impl DeltaSchedule
impl DeltaSchedule
Sourcepub fn new(interval: Duration) -> DeltaSchedule
pub fn new(interval: Duration) -> DeltaSchedule
Create a new time delta schedule which can be used to execute a task
forever, starting immediately and with the given interval
between subsequent executions.
Trait Implementations§
Source§impl Schedule for DeltaSchedule
impl Schedule for DeltaSchedule
Source§fn next_call_at(&self, last_run_at: Option<SystemTime>) -> Option<SystemTime>
fn next_call_at(&self, last_run_at: Option<SystemTime>) -> Option<SystemTime>
Compute when a task should be executed again.
If this method returns
None
then the task should
never run again and it is safe to remove it from the
list of scheduled tasks.Auto Trait Implementations§
impl Freeze for DeltaSchedule
impl RefUnwindSafe for DeltaSchedule
impl Send for DeltaSchedule
impl Sync for DeltaSchedule
impl Unpin for DeltaSchedule
impl UnwindSafe for DeltaSchedule
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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