pub struct TimerScheduleDriver { /* private fields */ }Expand description
Default schedule driver backed by tokio timers and the system clock.
Mirrors the TS TimerScheduleDriver: for cron expressions it computes the next fire time and arms
a single timer, rescheduling after each fire; for one-shot timestamps it fires once and removes the
entry. Driver-held timer tasks are tracked so ScheduleDriver::cancel / ScheduleDriver::dispose
can abort them.
Implementations§
Trait Implementations§
Source§impl Default for TimerScheduleDriver
impl Default for TimerScheduleDriver
Source§fn default() -> TimerScheduleDriver
fn default() -> TimerScheduleDriver
Returns the “default value” for a type. Read more
Source§impl ScheduleDriver for TimerScheduleDriver
impl ScheduleDriver for TimerScheduleDriver
Source§fn schedule(&self, entry: ScheduleEntry) -> ScheduleHandle
fn schedule(&self, entry: ScheduleEntry) -> ScheduleHandle
Schedule a callback to fire on a cron expression or at a specific time. Returns a cancellation
handle.
Source§fn cancel(&self, handle: &ScheduleHandle)
fn cancel(&self, handle: &ScheduleHandle)
Cancel a previously scheduled entry.
Auto Trait Implementations§
impl Freeze for TimerScheduleDriver
impl RefUnwindSafe for TimerScheduleDriver
impl Send for TimerScheduleDriver
impl Sync for TimerScheduleDriver
impl Unpin for TimerScheduleDriver
impl UnsafeUnpin for TimerScheduleDriver
impl UnwindSafe for TimerScheduleDriver
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.