pub struct EventHandle { /* private fields */ }
Expand description
An EventHandle is used to manage a single scheduled timer. If a handle is
dropped, the corresponding timeout will not fire. This behavior may be
bypassed via EventHandle::drop_without_cancel
.
Implementations§
Source§impl EventHandle
impl EventHandle
Sourcepub fn new_test(event_id: EventId) -> Self
pub fn new_test(event_id: EventId) -> Self
Helper fn to construct an EventHandle with a specific event ID. For tests only.
Sourcepub fn drop_without_cancel(self)
pub fn drop_without_cancel(self)
Drop this event handle, but still fire the underlying timer when expired. If we will never cancel a scheduled timer, this fn can be used to avoid unnecessary bookkeeping.
Trait Implementations§
Source§impl Debug for EventHandle
impl Debug for EventHandle
Auto Trait Implementations§
impl Freeze for EventHandle
impl RefUnwindSafe for EventHandle
impl Send for EventHandle
impl Sync for EventHandle
impl Unpin for EventHandle
impl UnwindSafe for EventHandle
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