pub struct WaitableTimer<C> { /* private fields */ }
Expand description
Provides waitable timer functionality.
Implementations§
Source§impl<C: Clock> WaitableTimer<C>
impl<C: Clock> WaitableTimer<C>
pub fn new(ctx: &IoContext) -> WaitableTimer<C>
pub fn async_wait<F>(&self, handler: F) -> F::Output
pub fn cancel(&self) -> &Self
pub fn expires_at(&self, expiry_time: C::TimePoint) -> &Self
pub fn expires_from_now(&self, expiry_time: C::Duration) -> &Self
Trait Implementations§
Source§impl<C> AsIoContext for WaitableTimer<C>
impl<C> AsIoContext for WaitableTimer<C>
Source§impl Debug for WaitableTimer<SteadyClock>
impl Debug for WaitableTimer<SteadyClock>
Source§impl Debug for WaitableTimer<SystemClock>
impl Debug for WaitableTimer<SystemClock>
impl<C> Send for WaitableTimer<C>
Auto Trait Implementations§
impl<C> Freeze for WaitableTimer<C>
impl<C> !RefUnwindSafe for WaitableTimer<C>
impl<C> !Sync for WaitableTimer<C>
impl<C> Unpin for WaitableTimer<C>where
C: Unpin,
impl<C> !UnwindSafe for WaitableTimer<C>
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