pub struct TimerMember<'group> { /* private fields */ }Expand description
A one-shot timer owned by a CleanupGroup.
Behaves like ThreadpoolTimer but is released by the group rather than by
its own drop.
Implementations§
Source§impl TimerMember<'_>
impl TimerMember<'_>
Sourcepub fn set_at(&self, when: SystemTime)
pub fn set_at(&self, when: SystemTime)
Fire once at the wall-clock instant when.
Sourcepub fn is_set(&self) -> bool
pub fn is_set(&self) -> bool
Whether the timer currently has a due time.
As with ThreadpoolTimer::is_set, expiring does not clear the due
time; only disarming does.
Sourcepub fn cancel_pending(&self)
pub fn cancel_pending(&self)
Cancel callbacks that have not started, then wait for those that have.
Trait Implementations§
Auto Trait Implementations§
impl<'group> Freeze for TimerMember<'group>
impl<'group> RefUnwindSafe for TimerMember<'group>
impl<'group> Send for TimerMember<'group>
impl<'group> Sync for TimerMember<'group>
impl<'group> Unpin for TimerMember<'group>
impl<'group> UnsafeUnpin for TimerMember<'group>
impl<'group> UnwindSafe for TimerMember<'group>
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