pub struct Timer<F: 'static, S: 'static> { /* private fields */ }
Expand description
A timer, used to schedule execution of callbacks in a given future.
If the callback does not provide the new time period, the next execution will be scheduled for a distant future.
Implementations§
Trait Implementations§
source§impl<F, S> IntoFuture for Timer<F, S>where
F: Fn() -> Option<NaiveDateTime> + Send,
S: Future + Send,
impl<F, S> IntoFuture for Timer<F, S>where F: Fn() -> Option<NaiveDateTime> + Send, S: Future + Send,
§type IntoFuture = Pin<Box<dyn Future<Output = <Timer<F, S> as IntoFuture>::Output>, Global>>
type IntoFuture = Pin<Box<dyn Future<Output = <Timer<F, S> as IntoFuture>::Output>, Global>>
Which kind of future are we turning this into?
source§fn into_future(self) -> Self::IntoFuture
fn into_future(self) -> Self::IntoFuture
Creates a future from a value. Read more
Auto Trait Implementations§
impl<F, S> !RefUnwindSafe for Timer<F, S>
impl<F, S> Send for Timer<F, S>where F: Send, S: Send,
impl<F, S> Sync for Timer<F, S>where F: Sync, S: Sync,
impl<F, S> Unpin for Timer<F, S>
impl<F, S> !UnwindSafe for Timer<F, S>
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