pub struct Timer<T> { /* private fields */ }
Available on crate feature
delay
only.Expand description
Async wrapper for a non-blocking countdown timer.
Implementations§
Trait Implementations§
Source§impl<T> DelayMs for Timer<T>
impl<T> DelayMs for Timer<T>
Source§fn poll_delay_ms(
self: Pin<&mut Self>,
_cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>
fn poll_delay_ms( self: Pin<&mut Self>, _cx: &mut Context<'_>, ) -> Poll<Result<(), Self::Error>>
Poll a delay of
ms
milliseconds.
This function may wake the calling function rather than the waker.fn poll_delay_ms_unpin(
&mut self,
cx: &mut Context<'_>,
) -> Poll<Result<(), Self::Error>>where
Self: Unpin,
Auto Trait Implementations§
impl<T> Freeze for Timer<T>where
T: Freeze,
impl<T> RefUnwindSafe for Timer<T>where
T: RefUnwindSafe,
impl<T> Send for Timer<T>where
T: Send,
impl<T> Sync for Timer<T>where
T: Sync,
impl<T> Unpin for Timer<T>where
T: Unpin,
impl<T> UnwindSafe for Timer<T>where
T: 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