pub struct Timer<'a, Type, State, Clock: Clock, Dur: Duration> { /* private fields */ }
Expand description
A Timer
counts toward an expiration, can be polled for elapsed and remaining time, and can be
one-shot or continuous/periodic.
Implementations§
Source§impl<'a, Type, State, Clock: Clock, Dur: Duration> Timer<'a, Type, State, Clock, Dur>
impl<'a, Type, State, Clock: Clock, Dur: Duration> Timer<'a, Type, State, Clock, Dur>
Sourcepub fn into_oneshot(self) -> Timer<'a, OneShot, State, Clock, Dur>
pub fn into_oneshot(self) -> Timer<'a, OneShot, State, Clock, Dur>
Change timer type to one-shot
Sourcepub fn into_periodic(self) -> Timer<'a, Periodic, State, Clock, Dur>
pub fn into_periodic(self) -> Timer<'a, Periodic, State, Clock, Dur>
Change timer type into periodic
Source§impl<Type, Clock: Clock, Dur: Duration> Timer<'_, Type, Running, Clock, Dur>
impl<Type, Clock: Clock, Dur: Duration> Timer<'_, Type, Running, Clock, Dur>
Trait Implementations§
Source§impl<'a, Type: Debug, State: Debug, Clock: Debug + Clock, Dur: Debug + Duration> Debug for Timer<'a, Type, State, Clock, Dur>
impl<'a, Type: Debug, State: Debug, Clock: Debug + Clock, Dur: Debug + Duration> Debug for Timer<'a, Type, State, Clock, Dur>
Auto Trait Implementations§
impl<'a, Type, State, Clock, Dur> Freeze for Timer<'a, Type, State, Clock, Dur>
impl<'a, Type, State, Clock, Dur> RefUnwindSafe for Timer<'a, Type, State, Clock, Dur>where
Dur: RefUnwindSafe,
Clock: RefUnwindSafe,
<Clock as Clock>::T: RefUnwindSafe,
Type: RefUnwindSafe,
State: RefUnwindSafe,
impl<'a, Type, State, Clock, Dur> Send for Timer<'a, Type, State, Clock, Dur>
impl<'a, Type, State, Clock, Dur> Sync for Timer<'a, Type, State, Clock, Dur>
impl<'a, Type, State, Clock, Dur> Unpin for Timer<'a, Type, State, Clock, Dur>
impl<'a, Type, State, Clock, Dur> UnwindSafe for Timer<'a, Type, State, Clock, Dur>where
Dur: UnwindSafe,
Clock: RefUnwindSafe,
<Clock as Clock>::T: UnwindSafe,
Type: UnwindSafe,
State: UnwindSafe,
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