Function task_hookrs::import::import

source ·
pub fn import<R: Read>(r: R) -> Result<Vec<Task>, Error>
Expand description

Import taskwarrior-exported JSON. This expects an JSON Array of objects, as exported by taskwarrior.

Examples found in repository?
src/tw.rs (line 41)
38
39
40
41
42
pub fn run_query_cmd(mut cmd: Command) -> Result<Vec<Task>, Error> {
    let mut export = cmd.spawn()?;
    export.wait()?;
    import(export.stdout.ok_or(Error::TaskCmdError)?)
}