spawn_std_core/
lib.rs

1pub trait Executor {
2    type Handle<T: Send + 'static>: Handle<T>;
3
4    fn spawn<T, F>(future: F) -> Self::Handle<T>
5    where
6        T: Send + 'static,
7        F: Future<Output = T> + Send + 'static;
8}
9
10pub trait Handle<T>: Future<Output = Result<T, Self::Error>> {
11    type Error: std::fmt::Debug;
12
13    fn abort(self);
14}