netpulse-cli 0.1.1

A zero-config, single-binary network quality monitor with percentile stats, jitter, and MTR-style traceroute
Documentation
// src/error.rs — Library-level error types for netpulse
// Uses `thiserror` for ergonomic, typed errors at the library boundary.
// The CLI layer wraps these with `anyhow` for context-rich display.

use thiserror::Error;

#[derive(Debug, Error)]
pub enum NetPulseError {
    #[error("socket error: {0}")]
    SocketError(#[from] std::io::Error),

    #[error("probe timed out after {timeout_ms}ms")]
    Timeout { timeout_ms: u64 },

    #[error("failed to parse probe response: {reason}")]
    ParseError { reason: String },

    #[error("invalid target address '{target}': {reason}")]
    InvalidTarget { target: String, reason: String },

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

    #[error("insufficient privileges — ICMP requires root or CAP_NET_RAW")]
    InsufficientPrivileges,
}