roa-core 0.3.2

core components of roa web framework
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use hyper::rt;
use std::future::Future;

/// An implementation of hyper::rt::Executor based on async-std
#[derive(Copy, Clone)]
pub struct Executor;

impl<F> rt::Executor<F> for Executor
where
    F: 'static + Send + Future,
    F::Output: 'static + Send,
{
    #[inline]
    fn execute(&self, fut: F) {
        async_std::task::spawn(fut);
    }
}