sidevm 0.1.10

Framework to help developing phala sidevm program
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! Executors to bridge frameworks to sidevm.

/// A hyper executor that executes futures with sidevm::spawn.
#[cfg(feature = "hyper")]
#[derive(Clone, Copy, Debug)]
pub struct HyperExecutor;

#[cfg(feature = "hyper")]
impl<F> hyper::rt::Executor<F> for HyperExecutor
where
    F: std::future::Future + 'static,
{
    fn execute(&self, fut: F) {
        crate::spawn(fut);
    }
}