Reorganize handling of task data

This abandons field-by-field compatibility with the TaskWarrior TDB2
format, which wasn't a sustainable strategy anyway.

Instead, tasks are represented as a TaskMap with custom key formats.  In
this commit, there are only a few allowed keys, with room to grow.

Replica returns convenience wrappers Task (read-only) and TaskMut
(read-write) with getters and setters to make modifying tasks easier.
This commit is contained in:
Dustin J. Mitchell
2020-11-23 12:38:32 -05:00
parent c2c2a00ed5
commit 634aaadb73
10 changed files with 276 additions and 490 deletions

16
Cargo.lock generated
View File

@@ -131,12 +131,6 @@ dependencies = [
"bitflags",
]
[[package]]
name = "either"
version = "1.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
[[package]]
name = "failure"
version = "0.1.6"
@@ -182,15 +176,6 @@ dependencies = [
"wasi",
]
[[package]]
name = "itertools"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b"
dependencies = [
"either",
]
[[package]]
name = "itoa"
version = "0.4.4"
@@ -622,7 +607,6 @@ dependencies = [
"chrono",
"clap",
"failure",
"itertools",
"kv",
"lmdb-rkv",
"proptest",