satex_core/executor.rs
1use hyper::rt::Executor;
2
3#[derive(Debug, Clone, Copy, Default)]
4pub struct SpawnLocalExecutor {}
5
6impl SpawnLocalExecutor {
7 pub fn new() -> Self {
8 Self {}
9 }
10}
11
12impl<F> Executor<F> for SpawnLocalExecutor
13where
14 F: Future + 'static,
15 F::Output: 'static,
16{
17 fn execute(&self, future: F) {
18 tokio::task::spawn_local(future);
19 }
20}