pub trait BraidRuntime:
Send
+ Sync
+ 'static {
// Required methods
fn spawn(&self, future: Pin<Box<dyn Future<Output = ()> + Send + 'static>>);
fn sleep(
&self,
duration: Duration,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'static>>;
fn now_ms(&self) -> u64;
}Expand description
Abstraction for asynchronous runtime operations.
Required Methods§
fn spawn(&self, future: Pin<Box<dyn Future<Output = ()> + Send + 'static>>)
fn sleep( &self, duration: Duration, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'static>>
fn now_ms(&self) -> u64
Implementors§
impl BraidRuntime for NativeRuntime
Available on crate feature
native only.