Expand description
§Doru
Doru is a simple library providing basic Todo
functionality. In its heart
is a TodoManager
that manages a vector of Todo
s - any interaction with
individual Todo
s is handled by the Manager.
Additionally, a TodoStorage
trait defines the contract for loading and
storing Todo
s from/ to arbitrary text format. An example JSON storage
implementing the trait is provided.
In some cases, the operations can fail. The TodoError
enum defines the
possible errors.
§Example
use doru::todo::TodoStatus;
use doru::todo_manager::TodoManager;
let mut manager = TodoManager::default();
let id = manager.add_todo("Learn Rust");
manager
.change_todo_status(id, TodoStatus::InProgress)
.unwrap();
let todos = manager.all_todos();
for todo in &todos {
println!("{:?}", todo);
}
Modules§
- storage
- File storage for
Todo
s. - todo
- A simple Todo item.
- todo_
manager - A
TodoManager
, responsible for managing interaction with a collection ofTodo
s.
Enums§
- Todo
Error - Possible errors that can occur while managing Todo items.