Trait napi::bindgen_prelude::Task [−][src]
pub trait Task: Send + Sized {
type Output: Send + Sized + 'static;
type JsValue: NapiValue;
fn compute(&mut self) -> Result<Self::Output>;
fn resolve(self, env: Env, output: Self::Output) -> Result<Self::JsValue>;
fn reject(self, _env: Env, err: Error) -> Result<Self::JsValue> { ... }
}