pub struct TimerConf { /* private fields */ }
Expand description
定时器配置
Implementations§
Source§impl TimerConf
impl TimerConf
Sourcepub fn datetimes(
&self,
range: impl RangeBounds<NaiveDateTime>,
) -> Result<Vec<NaiveDateTime>>
pub fn datetimes( &self, range: impl RangeBounds<NaiveDateTime>, ) -> Result<Vec<NaiveDateTime>>
在给定的日期时间范围内,返回符合定时器的所有时间点
Sourcepub fn next_with_time(&self, now: NaiveDateTime) -> NaiveDateTime
pub fn next_with_time(&self, now: NaiveDateTime) -> NaiveDateTime
以给定的时间点为起点(不包含该时点),返回下个符合定时器的时间点
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TimerConf
impl RefUnwindSafe for TimerConf
impl Send for TimerConf
impl Sync for TimerConf
impl Unpin for TimerConf
impl UnwindSafe for TimerConf
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