use std::str::FromStr; pub(crate) trait Task: FromStr { type Err: std::fmt::Display; type Success: std::fmt::Display = String; fn execute() -> Result::Err>; } pub(crate) trait IntoTask { type Err: std::fmt::Display; fn into_task(self) -> Result; } impl IntoTask for String { type Err = ::Err; fn into_task(self) -> Result {} } // // impl Task for { // type Err = std::num::ParseIntError; // type Success = u32; // // fn execute() -> Result { // Ok(42) // } // }