Expand description
§Doru
Doru is a simple library providing basic Todo functionality. In its heart
is a TodoManager that manages a vector of Todos - any interaction with
individual Todos is handled by the Manager.
Additionally, a TodoStorage trait defines the contract for loading and
storing Todos 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
Todos. - todo
- A simple Todo item.
- todo_
manager - A
TodoManager, responsible for managing interaction with a collection ofTodos.
Enums§
- Todo
Error - Possible errors that can occur while managing Todo items.