pub struct TimerRef<I, O>{ /* private fields */ }Expand description
A reference to a thread timer.
Trait Implementations§
Source§impl<I, O> WallClockTimer for TimerRef<I, O>
impl<I, O> WallClockTimer for TimerRef<I, O>
Source§type Error = ThreadTimerError
type Error = ThreadTimerError
Error type produced by timer operations.
Source§fn schedule_at(
&mut self,
deadline: SystemTime,
state: Self::State,
) -> Result<(), ThreadTimerError>
fn schedule_at( &mut self, deadline: SystemTime, state: Self::State, ) -> Result<(), ThreadTimerError>
Schedule the
state to be triggered at the given wall-clock deadline.Auto Trait Implementations§
impl<I, O> Freeze for TimerRef<I, O>
impl<I, O> RefUnwindSafe for TimerRef<I, O>
impl<I, O> Send for TimerRef<I, O>
impl<I, O> Sync for TimerRef<I, O>
impl<I, O> Unpin for TimerRef<I, O>
impl<I, O> UnwindSafe for TimerRef<I, O>
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> ChronoTimer for Twhere
T: WallClockTimer,
impl<T> ChronoTimer for Twhere
T: WallClockTimer,
Source§fn schedule_at_datetime<Tz>(
&mut self,
deadline: DateTime<Tz>,
state: <T as WallClockTimer>::State,
) -> Result<(), ChronoTimerError<<T as WallClockTimer>::Error>>
fn schedule_at_datetime<Tz>( &mut self, deadline: DateTime<Tz>, state: <T as WallClockTimer>::State, ) -> Result<(), ChronoTimerError<<T as WallClockTimer>::Error>>
Available on crate feature
chrono only.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<I, T> ClosureTimer for T
impl<I, T> ClosureTimer for T
Source§fn schedule_action_at<F>(
&mut self,
id: <T as WallClockTimer>::Id,
deadline: SystemTime,
action: F,
) -> Result<(), <T as WallClockTimer>::Error>
fn schedule_action_at<F>( &mut self, id: <T as WallClockTimer>::Id, deadline: SystemTime, action: F, ) -> Result<(), <T as WallClockTimer>::Error>
Schedule
action to be executed at deadline.