Skip to main content

Crate oflow

Crate oflow 

Source
Expand description

§oflow

A focused todo CLI library.

oflow provides both a command-line interface and a Rust library for managing todo items backed by SQLite. Use TodoManager as the high-level API, or work directly with TodoList and Todo for lower-level control.

§Quick Start

use oflow::TodoManager;

#[tokio::main]
async fn main() -> color_eyre::Result<()> {
    let mut manager = TodoManager::new().await?;
    manager.add("Buy milk").await?;
    manager.finish("Buy milk").await?;
    manager.clean().await?;

    for todo in manager.list() {
        println!("{}", todo);
    }
    Ok(())
}

§Modules

  • commands — CLI argument parsing and command dispatch (via clap).
  • database — Database persistence layer: sync, load, and query helpers implemented on TodoList.
  • models — Core data types: Todo and TodoList.

Re-exports§

pub use commands::Cli;
pub use commands::Commands;
pub use commands::execute_command;
pub use models::Todo;
pub use models::TodoList;

Modules§

commands
database
Database persistence operations for TodoList.
models

Structs§

TodoManager
A high-level manager for Todo operations.