Skip to main content

DispatcherTimerExt

Trait DispatcherTimerExt 

Source
pub trait DispatcherTimerExt: OnDispatcher {
    // Required method
    fn after_deadline(&self, deadline: MonotonicInstant) -> AfterDeadline<Self> ;
}
Expand description

Implements methods used for setting and waiting on timers on a dispatcher.

Required Methods§

Source

fn after_deadline(&self, deadline: MonotonicInstant) -> AfterDeadline<Self>

Returns a future that will fire when after the given deadline time.

This can be used instead of the fuchsia-async timer primitives in situations where there isn’t a currently active fuchsia-async executor running on that dispatcher for some reason (ie. the rust code does not own the dispatcher) or for cases where the small overhead of fuchsia-async compatibility is too much.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§