pub struct ManualTimer { /* private fields */ }Expand description
An asynchronous timer driven by one manual monotonic time domain.
Registrations are visible through the source clock’s coordination APIs before this timer returns their futures. The timer and its futures retain a private same-domain clock handle, so they remain valid if the source clock value is dropped.
Implementations§
Source§impl ManualTimer
impl ManualTimer
Sourcepub fn from_clock(clock: &ManualMonotonicClock) -> Self
pub fn from_clock(clock: &ManualMonotonicClock) -> Self
Trait Implementations§
Source§impl Debug for ManualTimer
impl Debug for ManualTimer
Source§impl Timer for ManualTimer
impl Timer for ManualTimer
Source§fn clock(&self) -> &dyn MonotonicClock
fn clock(&self) -> &dyn MonotonicClock
Returns the private same-domain manual clock handle.
§Returns
The monotonic clock driving this timer.
Source§fn at(&self, deadline: MonotonicInstant) -> Result<TimerFuture, TimeError>
fn at(&self, deadline: MonotonicInstant) -> Result<TimerFuture, TimeError>
Eagerly registers an absolute deadline with the manual clock.
§Parameters
deadline- Deadline in this timer’s manual clock domain.
§Returns
A cancellation-safe future whose registration is already active.
§Errors
Returns TimeError::ClockDomainMismatch for a foreign deadline.
§Panics
Panics when waiter identifiers are exhausted or when a reached observer waker panics during registration notification.
Auto Trait Implementations§
impl Freeze for ManualTimer
impl RefUnwindSafe for ManualTimer
impl Send for ManualTimer
impl Sync for ManualTimer
impl Unpin for ManualTimer
impl UnsafeUnpin for ManualTimer
impl UnwindSafe for ManualTimer
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