use qubit_function::{
Callable,
Runnable,
};
pub trait Executor: Send + Sync {
type Execution<R, E>
where
R: Send + 'static,
E: std::fmt::Display + Send + 'static;
#[inline]
fn execute<T, E>(&self, task: T) -> Self::Execution<(), E>
where
T: Runnable<E> + Send + 'static,
E: std::fmt::Display + Send + 'static,
{
let mut task = task;
self.call(move || task.run())
}
fn call<C, R, E>(&self, task: C) -> Self::Execution<R, E>
where
C: Callable<R, E> + Send + 'static,
R: Send + 'static,
E: std::fmt::Display + Send + 'static;
}