speedtest-cli 0.1.0

A fast and simple CLI tool to test internet connection speed with real-time progress indicators
use thiserror::Error;

#[derive(Error, Debug)]
pub enum SpeedTestError {
    #[error("Network error: {0}")]
    NetworkError(#[from] reqwest::Error),

    #[error("I/O error: {0}")]
    IoError(#[from] std::io::Error),

    #[error("Test failed: {0}")]
    TestFailed(String),

    #[error("Invalid configuration: {0}")]
    InvalidConfig(String),

    #[error("Timeout occurred during speed test")]
    Timeout,
}

pub type Result<T> = std::result::Result<T, SpeedTestError>;