10 lines
267 B
Rust
10 lines
267 B
Rust
use crate::{Env, Result, Value, ValueType};
|
|
|
|
pub trait Task {
|
|
type Output: Send + Sized + 'static;
|
|
type JsValue: ValueType;
|
|
|
|
fn compute(&self) -> Result<Self::Output>;
|
|
|
|
fn resolve(&self, env: &mut Env, output: Self::Output) -> Result<Value<Self::JsValue>>;
|
|
}
|