threader/executor.rs
1use futures::Future;
2
3/// A trait which includes a spawning method common to all
4/// future executors.
5pub trait Executor<F: Future> {
6 /// Spawns a future on this executor. In general, this
7 /// method should not fail or panic, but this is left up
8 /// to whatever is implementing the trait.
9 fn spawn(&self, future: F);
10}