1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
use serde::Deserialize; pub type TaskOutput = Result<String, String>; pub mod client; pub mod server; pub struct Task<N> { pub name: N, pub exec: fn(&[&str]) -> TaskOutput, } #[derive(Deserialize)] pub struct CompletedTask<N> { pub name: N, pub output: Option<TaskOutput>, } #[derive(Debug)] pub enum IntoTaskErr { NotFound(String), }