pub trait InternalRuntime {
// Required methods
fn push_boxed(&mut self, future: Pin<Box<dyn Future<Output = ()>>>) -> u64;
fn contains(&mut self, id: u64) -> bool;
fn sleep<'a>(
&self,
duration: Duration,
) -> Pin<Box<dyn Future<Output = ()> + 'a>>;
fn stop(&mut self) -> Stop ⓘ;
}
Expand description
Trait to be implemented by async runtimes
Required Methods§
Sourcefn push_boxed(&mut self, future: Pin<Box<dyn Future<Output = ()>>>) -> u64
fn push_boxed(&mut self, future: Pin<Box<dyn Future<Output = ()>>>) -> u64
Adds a new future to the queue to be completed.