pub trait AsyncEngine: 'static {
// Required methods
fn background(f: impl FnOnce() + Send + 'static);
fn block_on<R: Send + Sync + 'static>(
f: impl FnOnce() -> R + Send + Sync + 'static,
) -> impl Future<Output = R> + Send + Sync;
fn exec_after(delay: Duration, f: impl FnOnce() + Send + 'static);
}Required Methods§
fn background(f: impl FnOnce() + Send + 'static)
fn block_on<R: Send + Sync + 'static>( f: impl FnOnce() -> R + Send + Sync + 'static, ) -> impl Future<Output = R> + Send + Sync
fn exec_after(delay: Duration, f: impl FnOnce() + Send + 'static)
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.