Skip to main content

DynAsyncClock

Trait DynAsyncClock 

Source
pub trait DynAsyncClock: PipelineClock {
    // Required method
    fn sleep_until_ns<'a>(&'a self, deadline_ns: u64) -> BoxFuture<'a, ()>;
}
Expand description

Object-safe companion to AsyncClock: the same absolute-deadline sleep, but returning a BoxFuture instead of a GAT, so it can be held as &dyn DynAsyncClock (the same reason DynAsyncElement mirrors AsyncElement). The runner’s fan-in arm needs an erased clock to sleep on its tick deadline.

Blanket-implemented for every AsyncClock, so no clock implements it directly.

Required Methods§

Source

fn sleep_until_ns<'a>(&'a self, deadline_ns: u64) -> BoxFuture<'a, ()>

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§