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