pub(crate) struct TimerEntry {
driver: Handle,
inner: Option<TimerShared>,
deadline: Instant,
registered: bool,
}
Fields§
§driver: Handle
§inner: Option<TimerShared>
§deadline: Instant
§registered: bool
Implementations§
Source§impl TimerEntry
impl TimerEntry
pub(crate) fn new(handle: Handle, deadline: Instant) -> Self
fn inner(&self) -> Option<&TimerShared>
fn init_inner(self: Pin<&mut Self>)
pub(crate) fn deadline(&self) -> Instant
pub(crate) fn is_elapsed(&self) -> bool
Sourcepub(crate) fn cancel(self: Pin<&mut Self>)
pub(crate) fn cancel(self: Pin<&mut Self>)
Cancels and deregisters the timer. This operation is irreversible.
pub(crate) fn reset(self: Pin<&mut Self>, new_time: Instant, reregister: bool)
pub(crate) fn poll_elapsed( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
pub(crate) fn driver(&self) -> &Handle
Trait Implementations§
Source§impl Debug for TimerEntry
impl Debug for TimerEntry
Source§impl Drop for TimerEntry
impl Drop for TimerEntry
impl Send for TimerEntry
impl Sync for TimerEntry
impl<'__pin> Unpin for TimerEntrywhere
PinnedFieldsOf<__Origin<'__pin>>: Unpin,
Auto Trait Implementations§
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