asynk_hyper/
exec.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use hyper::rt::Executor;
use std::future::Future;

#[derive(Clone)]
pub struct AsynkExecutor;

impl<Fut> Executor<Fut> for AsynkExecutor
where
    Fut: Future + Send + 'static,
    Fut::Output: Send + 'static,
{
    fn execute(&self, fut: Fut) {
        asynk::spawn(fut);
    }
}