netspeed_cli/lib.rs
1//! # netspeed-cli
2//!
3//! A command-line internet bandwidth tester using speedtest.net servers.
4//!
5//! ## Overview
6//!
7//! This crate provides both a library and a binary (`netspeed-cli`) for
8//! measuring download speed, upload speed, latency, jitter, and latency
9//! under load. It connects to speedtest.net's server infrastructure to
10//! perform real-world bandwidth tests.
11//!
12//! ## Modules
13//!
14//! - [`bin_errors`] — Binary-level error handling and exit codes
15//! - [`cli`] — Command-line argument parsing with clap
16//! - [`common`] — Shared utilities (bandwidth calculation, formatting, validation)
17//! - [`config`] — Configuration management (CLI args + config file)
18//! - [`domain`] — Core business logic (measurement, reporting, server, speedtest)
19//! - [`download`] — Multi-stream download bandwidth measurement
20//! - [`endpoints`] — Canonical speedtest endpoint derivation
21//! - [`upload`] — Multi-stream upload bandwidth measurement
22//! - [`error`] — Unified error types with categorization
23//! - [`formatter`] — Output formatting (detailed, simple, JSON, CSV)
24//! - [`grades`] — Quality grade system (A-F ratings)
25//! - [`history`] — Persistent test result history
26//! - [`http`] — HTTP client creation and IP discovery
27//! - [`profiles`] — User profiles/roles (gamer, streamer, etc.)
28//! - [`progress`] — Terminal progress bars and spinners
29//! - [`servers`] — Server discovery, distance calculation, and selection
30//! - [`task_runner`] — Test orchestration with template method pattern
31//! - [`types`] — Shared data structures (Server, `TestResult`, etc.)
32
33// Pedantic lints allowed at crate level — too noisy for a CLI bandwidth tester.
34// Individual modules may re-enable specific lints where stricter checking is desired.
35#![allow(
36 clippy::cast_precision_loss,
37 clippy::cast_possible_truncation,
38 clippy::cast_sign_loss
39)]
40
41pub mod bandwidth_loop;
42pub mod bin_errors;
43pub mod cli;
44pub mod common;
45pub mod config;
46pub mod domain;
47pub mod download;
48pub mod endpoints;
49pub mod error;
50pub mod formatter;
51pub mod grades;
52pub mod history;
53pub mod http;
54pub mod http_client;
55pub mod logging;
56pub mod orchestrator;
57pub mod output;
58pub mod output_strategy;
59pub mod phase_registry;
60pub mod phase_runner;
61pub mod phases;
62pub mod profiles;
63pub mod progress;
64pub mod result_processor;
65pub mod servers;
66pub mod services;
67pub mod storage;
68pub mod task_runner;
69pub mod terminal;
70pub mod test_config;
71pub mod theme;
72pub mod types;
73pub mod upload;