pub trait InternalRuntime {
    fn push_boxed(&mut self, future: BoxFuture<'static, ()>) -> u64;
    fn contains(&self, id: u64) -> bool;
    fn sleep<'a>(&self, duration: Duration) -> BoxFuture<'a, ()>;
    fn stop(&mut self);
}
Expand description

Trait to be implemented by async runtimes

Required Methods§

Adds a new future to the queue to be completed.

Returns if a future by some ID is still running.

Asynchronously sleeps

Stops the runtime

Implementors§