pub struct TimerHandle(/* private fields */);Expand description
Handle to a timer registered with ntex’s local timer wheel.
Dropping the handle cancels the timer. A handle may be reset and reused after it has elapsed.
Implementations§
Source§impl TimerHandle
impl TimerHandle
Sourcepub fn is_elapsed(&self) -> bool
pub fn is_elapsed(&self) -> bool
Returns true if this timer has elapsed.
Sourcepub fn poll_elapsed(&self, cx: &mut Context<'_>) -> Poll<()>
pub fn poll_elapsed(&self, cx: &mut Context<'_>) -> Poll<()>
Polls until this timer has elapsed.
Trait Implementations§
Source§impl Debug for TimerHandle
impl Debug for TimerHandle
Source§impl Drop for TimerHandle
impl Drop for TimerHandle
Auto Trait Implementations§
impl Freeze for TimerHandle
impl RefUnwindSafe for TimerHandle
impl Send for TimerHandle
impl Sync for TimerHandle
impl Unpin for TimerHandle
impl UnsafeUnpin for TimerHandle
impl UnwindSafe for TimerHandle
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