use crate::js_values::NapiValue; use crate::{Env, Result}; pub trait Task: Send { type Output: Send + Sized + 'static; type JsValue: NapiValue; fn compute(&mut self) -> Result; fn resolve(&self, env: &mut Env, output: Self::Output) -> Result; }