Something went wrong. Try again.
A CLI for giving agents access to crate documentation.
Something went wrong. Try again.
12345678910111213141516171819202122232425//! Unified error type for all cratedoc operations.//!//! `CratedocError` wraps cache, I/O, network, JSON, and TOML errors//! plus a catch-all `Other` variant for ad-hoc error messages.
use thiserror::Error;
#[derive(Error, Debug)]pub enum CratedocError { #[error("Cache error: {0}")] CacheError(String), #[error("IO error: {0}")] IoError(#[from] std::io::Error), #[error("Network error: {0}")] NetworkError(#[from] reqwest::Error), #[error("JSON error: {0}")] JsonError(#[from] serde_json::Error), #[error("TOML error: {0}")] TomlError(#[from] toml::de::Error), #[error("Other error: {0}")] Other(String),}
pub type Result<T> = std::result::Result<T, CratedocError>;