pub struct IntervalTrigger { /* private fields */ }
Expand description
Interval-based trigger
Implementations§
Source§impl IntervalTrigger
impl IntervalTrigger
pub fn new(interval: Duration) -> Self
pub fn with_start_time(self, start_time: SystemTime) -> Self
pub fn with_end_time(self, end_time: SystemTime) -> Self
pub fn with_repeat_count(self, count: u32) -> Self
pub fn every_seconds(seconds: u64) -> Self
pub fn every_minutes(minutes: u64) -> Self
pub fn every_hours(hours: u64) -> Self
Trait Implementations§
Source§impl Clone for IntervalTrigger
impl Clone for IntervalTrigger
Source§fn clone(&self) -> IntervalTrigger
fn clone(&self) -> IntervalTrigger
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for IntervalTrigger
impl Debug for IntervalTrigger
Source§impl Trigger for IntervalTrigger
impl Trigger for IntervalTrigger
Source§fn next_execution_time(&self, after: SystemTime) -> Option<SystemTime>
fn next_execution_time(&self, after: SystemTime) -> Option<SystemTime>
Get the next execution time after the given time
Source§fn has_next(&self, after: SystemTime) -> bool
fn has_next(&self, after: SystemTime) -> bool
Check if this trigger will fire again
Source§fn description(&self) -> String
fn description(&self) -> String
Get trigger description
Source§fn should_trigger_now(&self, now: SystemTime) -> bool
fn should_trigger_now(&self, now: SystemTime) -> bool
Check if this trigger should fire now (new method for delay support)
Auto Trait Implementations§
impl Freeze for IntervalTrigger
impl RefUnwindSafe for IntervalTrigger
impl Send for IntervalTrigger
impl Sync for IntervalTrigger
impl Unpin for IntervalTrigger
impl UnwindSafe for IntervalTrigger
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