Function task_hookrs::tw::run_query_cmd

source ·
pub fn run_query_cmd(cmd: Command) -> Result<Vec<Task>, Error>
Expand description

This executes the given Command and trys to convert the Result into a Vec.

Examples found in repository?
src/tw.rs (line 25)
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)
}