6 releases

0.3.2 Mar 30, 2024
0.3.1 Mar 30, 2024
0.1.2 Oct 16, 2022

#679 in Parser implementations

Download history 2/week @ 2024-07-25 3/week @ 2024-09-19 3/week @ 2024-09-26 2/week @ 2024-10-03

131 downloads per month

MIT/Apache

135KB
3.5K SLoC

Crates.io Crates.io Docs

Description

Library used to interact with Taskwarrior in Rust.

Usage

Add this crate to your Cargo.toml file, or use cargo add tasklib.

[dependencies]
tasklib = "0.3"

Here is a minimal example.

use tasklib::Task;

let json = r#"
{
  "id": 0,
  "description": "Task to do",
  "end": "20220131T083000Z",
  "entry": "20220131T083000Z",
  "modified": "20220131T083000Z",
  "project": "Daily",
  "start": "20220131T083000Z",
  "status": "pending",
  "uuid": "d67fce70-c0b6-43c5-affc-a21e64567d40",
  "tags": [
    "WORK"
  ],
  "urgency": 9.91234
}"#;

// Getting a Task from your input JSON string.
let task: Task = Task::from(json);
// Getting a String from your Serialized Task
let task_str: String = task.into();

Dependencies

~2.5–4MB
~71K SLoC