Skip to content

Rust Documentation

The Aranet project provides comprehensive Rust API documentation generated from inline doc comments using rustdoc.

  1. Clone the repository

    Terminal window
    git clone https://github.com/cameronrye/aranet.git
    cd aranet
  2. Generate the documentation

    Terminal window
    cargo doc --workspace --no-deps --open
  3. Browse the docs

    Your browser will open automatically with the documentation for all crates.

CrateDescription
aranet-typesPlatform-agnostic types shared across all crates
aranet-coreCore BLE library with device discovery, readings, and settings
aranet-storeSQLite-based data persistence for readings and history
aranet-serviceBackground collector and HTTP REST API server
aranet-cliCommand-line interface for quick readings and data export
aranet-tuiTerminal UI dashboard for real-time monitoring
aranet-guiDesktop GUI application

All public APIs are documented with:

  • Function/method descriptions - What the function does
  • Parameters - Description of each parameter
  • Return values - What the function returns
  • Examples - Usage examples where applicable
  • Errors - Possible error conditions
use aranet_core::{Device, scan};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
// Scan for nearby Aranet devices
let devices = scan::scan_for_devices().await?;
println!("Found {} devices", devices.len());
// Connect to the first device found
if let Some(info) = devices.first() {
let device = Device::connect(&info.name).await?;
// Read current sensor values
let reading = device.read_current().await?;
println!("CO₂: {} ppm", reading.co2);
println!("Temperature: {:.1}°C", reading.temperature);
}
Ok(())
}

Made with ❤️ by Cameron Rye