pub fn run_query_cmd(cmd: Command) -> Result<Vec<Task>, Error>
This executes the given Command and trys to convert the Result into a Vec.
22 23 24 25 26
pub fn query(query: &str) -> Result<Vec<Task>, Error> { let mut cmd = add_query_to_cmd(query, Command::new("task")); cmd.stdout(Stdio::piped()); run_query_cmd(cmd) }