task_hookrs/lib.rs
1//
2// This Source Code Form is subject to the terms of the Mozilla Public
3// License, v. 2.0. If a copy of the MPL was not distributed with this
4// file, You can obtain one at http://mozilla.org/MPL/2.0/.
5//
6
7//! This crate exports functionality to import and export taskwarrior-compatible JSON by
8//! translating the JSON into rust types and vice-versa.
9//!
10//! For example:
11//!
12//! ```
13//! use std::io::stdin;
14//!
15//! use task_hookrs::task::{Task, TW26};
16//! use task_hookrs::import::import;
17//!
18//! if let Ok(tasks) = import::<TW26, _>(stdin()) {
19//! for task in tasks {
20//! println!("Task: {}, entered {:?} is {} -> {}",
21//! task.uuid(),
22//! task.entry(),
23//! task.status(),
24//! task.description());
25//! }
26//! }
27//! ```
28//!
29#![deny(missing_docs)]
30#![deny(
31 dead_code,
32 non_camel_case_types,
33 non_snake_case,
34 path_statements,
35 trivial_numeric_casts,
36 unstable_features,
37 unused_allocation,
38 unused_import_braces,
39 unused_imports,
40 unused_must_use,
41 unused_mut,
42 unused_qualifications,
43 while_true
44)]
45
46pub mod annotation;
47pub mod date;
48pub mod error;
49pub mod import;
50pub mod priority;
51pub mod project;
52pub mod status;
53pub mod tag;
54pub mod task;
55pub mod tw;
56pub mod uda;
57pub mod urgency;