pub trait Driver: Sync {
// Required methods
fn now(&self) -> Instant;
fn schedule_wake(&self, deadline: Instant, waker: Waker);
}Expand description
The timer driver interface every backend implements. Selected at build time
by the timer axis of the active profile; bound at link time via the static
BOUND_DRIVER symbol proxima-time’s build emits.
Implementations must be Sync because BOUND_DRIVER is a global &'static.
They are typically zero-sized or use interior mutability.
Required Methods§
Sourcefn schedule_wake(&self, deadline: Instant, waker: Waker)
fn schedule_wake(&self, deadline: Instant, waker: Waker)
Arrange for waker to be woken at or after deadline. Drivers must be
tolerant of multiple registrations from the same waker; Waker::wake is
idempotent for already-pending tasks.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".