Reorganize taskchampion crate for docs and tests

The public API of the taskchampion crate now contains the expected parts
and no more, and has some better documentation.

This moves the crate's external `tests/` into internal tests, as the
TaskDB is no longer exposed as part of the crate API.
This commit is contained in:
Dustin J. Mitchell 2020-11-23 15:59:37 -05:00
parent 8f4924f903
commit 8e2b4c3f6c
16 changed files with 395 additions and 347 deletions

View file

@ -1,14 +1,38 @@
/*!
This crate implements the core of TaskChampion, the [replica](crate::Replica).
A TaskChampion replica is a local copy of a user's task data. As the name suggests, several
replicas of the same data can exist (such as on a user's laptop and on their phone) and can
synchronize with one another.
# Task Storage
The [`taskstorage`](crate::taskstorage) module supports pluggable storage for a replica's data.
An implementation is provided, but users of this crate can provide their own implementation as well.
# Server
Replica synchronization takes place against a server.
The [`server`](crate::server) module defines the interface a server must meet.
# See Also
See the [TaskChampion Book](https://github.com/djmitche/taskchampion/blob/main/docs/src/SUMMARY.md)
for more information about the design and usage of the tool.
*/
mod errors;
mod operation;
mod replica;
pub mod server;
mod task;
mod taskdb;
pub mod taskstorage;
pub use operation::Operation;
pub use replica::Replica;
pub use task::Priority;
pub use task::Status;
pub use task::Task;
pub use taskdb::DB;
pub use task::{Task, TaskMut};
#[cfg(test)]
pub(crate) mod testing;