pub trait AsyncExecutor:
Clone
+ Send
+ Sync {
// Required methods
fn new() -> Self;
fn spawn<F: Future<Output = ()> + Send + 'static>(&self, future: F);
fn block_on<F: Future<Output = ()>>(&self, future: F);
}Expand description
Runtime-agnostic async task executor trait.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl AsyncExecutor for TokioExecutor
Available on crate feature
tokio only.