executor_core/
async_executor.rs

1use crate::{Executor, LocalExecutor};
2use core::future::Future;
3
4impl Executor for async_executor::Executor<'static> {
5    fn spawn<T: Send + 'static>(
6        &self,
7        fut: impl Future<Output = T> + Send + 'static,
8    ) -> async_task::Task<T> {
9        async_executor::Executor::spawn(self, fut)
10    }
11}
12
13impl LocalExecutor for async_executor::LocalExecutor<'static> {
14    fn spawn<T: 'static>(&self, fut: impl Future<Output = T> + 'static) -> async_task::Task<T> {
15        async_executor::LocalExecutor::spawn(self, fut)
16    }
17}