deboa 0.1.0-beta.15

A friendly rest client on top of hyper.
use hyper::rt::Executor;
use std::future::Future;

#[non_exhaustive]
#[derive(Default, Debug, Clone)]
pub struct SmolExecutor {}

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

impl SmolExecutor {
    pub fn new() -> Self {
        Self {}
    }
}