Timing

Trait Timing 

Source
pub trait Timing {
    // Required methods
    fn create_timeout(
        &mut self,
        duration: Millis,
        callback: impl 'static + FnOnce(&mut Self),
    ) -> Timeout;
    fn cancel_timeout(&mut self, timeout: Timeout);
}
Expand description

Designing everything for a pratical system is hard. Designing everything correctly is impossible. That’s why a versioned spec module is prepared.

At any time top level module does wildcard re-exporting from the latest version of spec. To survive from a breaking change, change use crate::* to use crate::spec::v1::*.

Required Methods§

Source

fn create_timeout( &mut self, duration: Millis, callback: impl 'static + FnOnce(&mut Self), ) -> Timeout

Source

fn cancel_timeout(&mut self, timeout: Timeout)

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§

Source§

impl<P, A, const R: u8> Timing for Engine<P, A, R>
where RecvT<Self, P, A>: Tag<R>,